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

Hashbrown 0.15.0 #787

Closed
takaomag opened this issue Oct 2, 2024 · 2 comments · Fixed by #790
Closed

Hashbrown 0.15.0 #787

takaomag opened this issue Oct 2, 2024 · 2 comments · Fixed by #790
Labels
enhancement New feature or request

Comments

@takaomag
Copy link

takaomag commented Oct 2, 2024

Yesterday, hashbrown 0.15.0 is released.

Currently, serde_with has hashbrown_0_14 feature which supports only 0.14.
New hashbrown_0_15 feature or hashbrown feature for both versions should be added?

@jonasbb
Copy link
Owner

jonasbb commented Oct 2, 2024

Hi and thanks for the information. The correct way to go about it is to add a new optional dependency and feature. Both named hashbrown_0_15. It can be mostly a copy of the existing code.

## The feature enables `hashbrown::{HashMap, HashSet}` as supported containers.
##
## This pulls in `hashbrown` v0.14 as a dependency.
## It enables the `alloc` feature.
## Some functionality is only available when `std` is enabled too.
hashbrown_0_14 = ["dep:hashbrown_0_14", "alloc"]

The next steps are to copy the implementations that exist for hashbrown_0_14 and copy them over too. The implementations for map and set types is spread throughout the code base, but can usually be found by looking at the type names or imports.
#[cfg(feature = "hashbrown_0_14")]
use hashbrown_0_14::{HashMap as HashbrownMap014, HashSet as HashbrownSet014};

@jonasbb jonasbb added the enhancement New feature or request label Oct 2, 2024
@takaomag
Copy link
Author

takaomag commented Oct 3, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants