Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests to validate that regions implement a common interface #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 [email protected]

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 <[email protected]>
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