Skip to content

Prepare for 0.3 release #39

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

Merged
merged 5 commits into from
Sep 21, 2024
Merged

Prepare for 0.3 release #39

merged 5 commits into from
Sep 21, 2024

Conversation

declanvk
Copy link
Owner

No description provided.

**Description**
 - Add a default PREFIX_LEN to all iterator types with a value of 16
 - Remove most instances of `*Keys`, `*Values`, `*ValuesMut`
   iterators
 - Rename the tree iterators to match the `std::collection::BTreeMap`
   ones
 - Add `#[non_exhaustive]` to the well-formed visitor error type

**Motivation**
 - Adding a default `PREFIX_LEN` biases towards making it easy to
   provide a type for the iterators in the common case, without the
   user ever needing to learn about the prefix or what the default
   length is.
 - I don't really like all the extra iterators, and I'm only keeping
   the remaining ones because `BTreeMap` has them
 - I also wanted to match the tree iterators names to have the same
   as in the stdlib, making it easier to drop-in replace using this
   crate
 - Adding `#[non_exhaustive]` makes future additions to the enum
   non-breaking changes

**Testing Done**
`./scripts/full-test.sh nightly`
**Description**
Add tests and unsafe impls to ensure that the `TreeMap` and related
types are `Send` and `Sync`.

**Motivation**
This is needed to match the interface of the `BTreeMap` and to make
sure we don't regress on this behavior between releases.

The `unsafe impl`s are not my favorite way to implement this, I would
have preferred that the building block types were naturally `Send` or
`Sync`, that wasn't easily done. Maybe a future improvement to remove
those.

**Testing Done**
`./scripts/full-test.sh nightly`
@declanvk declanvk merged commit bbc4f24 into main Sep 21, 2024
4 checks passed
@declanvk declanvk deleted the prepare-0.3 branch September 21, 2024 05:47
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