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

Release 2.0.0 #267

Merged
merged 1 commit into from Jun 23, 2023
Merged

Release 2.0.0 #267

merged 1 commit into from Jun 23, 2023

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jun 23, 2023

  • MSRV: Rust 1.64.0 or later is now required.

  • The "std" feature is no longer auto-detected. It is included in the
    default feature set, or else can be enabled like any other Cargo feature.

  • The "serde-1" feature has been removed, leaving just the optional
    "serde" dependency to be enabled like a feature itself.

  • IndexMap::get_index_mut now returns Option<(&K, &mut V)>, changing
    the key part from &mut K to &K. There is also a new alternative
    MutableKeys::get_index_mut2 to access the former behavior.

  • The new map::Slice<K, V> and set::Slice<T> offer a linear view of maps
    and sets, behaving a lot like normal [(K, V)] and [T] slices. Notably,
    comparison traits like Eq only consider items in order, rather than hash
    lookups, and slices even implement Hash.

  • IndexMap and IndexSet now have sort_by_cached_key and
    par_sort_by_cached_key methods which perform stable sorts in place
    using a key extraction function.

  • IndexMap and IndexSet now have reserve_exact, try_reserve, and
    try_reserve_exact methods that correspond to the same methods on Vec.
    However, exactness only applies to the direct capacity for items, while the
    raw hash table still follows its own rules for capacity and load factor.

  • The Equivalent trait is now re-exported from the equivalent crate,
    intended as a common base to allow types to work with multiple map types.

  • The hashbrown dependency has been updated to version 0.14.

  • The serde_seq module has been moved from the crate root to below the
    map module.

@ds-cbo
Copy link

ds-cbo commented Sep 27, 2023

With hashbrown 0.14 relaxing its MSRV to 1.63.0 to support Debian stable, would it also be possible to relax indexmap's MSRV to 1.63.0 along with it? That would make indexmap v2 usable for hyperium/h2 with the same 1.63.0 MSRV, and prune the duplicated indexmap dependency (currently both v1.9.6 for h2 through hyper and v2.0.0 for toml_edit) from our compile trees.

Also see discussion here: hyperium/h2#698

Update: My bad, I just saw the comment here that hashbrown hasn't released an updated 0.14 yet with the relaxed MSRV, and that it's still a hot topic. I'm sorry for being impatient.

@cuviper
Copy link
Member Author

cuviper commented Sep 27, 2023

How about this: I can make the update here with --ignore-rust-version in CI to get past hashbrown's published MSRV, so it will be in place if/when hashbrown does publish that change.

@cuviper
Copy link
Member Author

cuviper commented Sep 27, 2023

Published via #276.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment