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

Update changelog #75

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
### Changed

- `IntMap::new` is now const and creates an instance with zero capacity, thus will not allocate. The latter is also true for `IntMap::default`. Previously the initial capacity was 4. If you want to restore the old behavior, you can use `IntMap::with_capacity(4)`.
- The prime for hashing `u64` keys has changed. The previous one was `11400714819323198549u64`. If you want to restore the old prime, you can create a wrapper type for the `u64` key and implement `IntKey` for it.
- Make all iterator structs public.

### Changed Breaking!
- `IntMap` and co. have now a new type parameter `K` that represents the key type. The key can be any primitive integer. Custom types that wrap primitive integers are also supported if they implement `IntKey`.
- The iterator structs return the key by value instead of by reference.

## [2.0.0] 2022-07-17

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ test tests::u64_insert_no_op_without_capacity ... bench: 190,528.64 ns/it
test tests::u64_resize_intmap ... bench: 55,155.88 ns/iter (+/- 648.32)
```
# Breaking Changes
2.0.0 - Changed behavior of `insert` to match std::HashMap. The old behavior is renamed to `insert_checked`.

Breaking changes are documented in the [CHANGELOG.md].

# How to use
Simple example:
Expand Down
Loading