Conversation
**Description** Before this testing module was a hidden part of the public API, this change makes it so that users would need to opt in. I learned from rust-lang/cargo#2911 that you can take a `dev-dependency` recursively with extra features enabled, this allows the feature to be off by default and still used in the dev dependencies. **Testing Done** Unit tests already exercise this code.
**Description** We used `bytemuck` for conversion to bytes and between compatible types, to avoid doing raw `transmute`s. Switching to `zerocopy` because I'd like to use it for a future commit and it felt redundant to keep `bytemuck` around.
All types that implement `InnerNode` must be `repr(C)` and have a `Header` as their first field. This allows other unsafe code to rely on casting a pointer to any inner node to a pointer to a `Header`. This commit formalizes this requirement by marking `InnerNode` as an `unsafe trait`. Also change `leaf_node_ptr.read()` to `leaf_node_ptr.as_ref()` to avoid an unnecessary copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_commonmodule and place behind feature flag