Skip to content

Tests to validate that regions implement a common interface#62

Open
antiguru wants to merge 1 commit intomainfrom
useful_types
Open

Tests to validate that regions implement a common interface#62
antiguru wants to merge 1 commit intomainfrom
useful_types

Conversation

@antiguru
Copy link
Owner

We don't require region implementations to provide other trait
implementations, but in many cases it is useful to have push/reserve
implementations. This tests checks that regions provided by this crate
provide said implementations. Specifically, it checks that regions can
absorb their owned type, references to their owned type, the read item,
and allow to reserve space for references to the owned type and the read
item. Additionally, regions for where owned types are Deref, the region
should absorb references to the deref target, and be able to reserve it.

This surfaced some missing APIs which we add in this change. Namely, the
columns region missed reserve APIs. Adding the reserve implementations
required the column's item getter to return an option (elements are not
required to have the same length.) The codec region still doesn't provide
all implementations required, but it's closer and provides sufficient
push implementations. It only misses the reserve items API, which does not
make too much sense in its context.

Signed-off-by: Moritz Hoffmann antiguru@gmail.com

We don't require region implementations to provide other trait
implementations, but in many cases it is useful to have push/reserve
implementations. This tests checks that regions provided by this crate
provide said implementations. Specifically, it checks that regions can
absorb their owned type, references to their owned type, the read item,
and allow to reserve space for references to the owned type and the read
item. Additionally, regions for where owned types are Deref, the region
should absorb references to the deref target, and be able to reserve it.

This surfaced some missing APIs which we add in this change. Namely, the
columns region missed reserve APIs. Adding the reserve implementations
required the column's item getter to return an option (elements are not
required to have the same length.) The codec region still doesn't provide
all implementations required, but it's closer and provides sufficient
push implementations. It only misses the reserve items API, which does not
make too much sense in its context.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 25, 2024

CodSpeed Performance Report

Merging #62 will not alter performance

Comparing useful_types (1b355b5) with main (712966c)

Summary

✅ 69 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant