Skip to content

Conversation

@austinhartzheim
Copy link

@austinhartzheim austinhartzheim commented Aug 21, 2024

Looking at the patch set in this PR, I noticed that the Clone + Copy + Default trait bounds were added throughout the crate's public interface, including on the structs.

  1. It's generally discouraged to add trait bounds to the structs directly. See C-STRUCT-BOUNDS.
  2. Once the bounds are removed from the struct, we can carry that simplification through a number of places.

I made a pass at removing those bounds where it is trivial to do so. There's probably more that can be done to simplify these bounds.

Also, I noticed that one test required both the rkyv and bytecheck features to be enabled. Assuming we want these features to remain independent (i.e., not bundled together behind a single feature flag), I moved the portion of the test requiring the bytecheck crate behind the bytecheck feature flag.

Remove implicit requirements T: Clone + Copy + Default.

Fix test that required both `rkyv` and `bytecheck` features, placing
the `bytecheck` portion of the test behind a feature flag.
@bocharov bocharov merged commit 8e9385b into bocharov:ab/add-rkyv-support Aug 22, 2024
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.

2 participants