]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #94647 - Urgau:hash-map-many-mut, r=Amanieu
authorYuki Okushi <jtitor@2k36.org>
Wed, 1 Jun 2022 14:36:45 +0000 (23:36 +0900)
committerGitHub <noreply@github.com>
Wed, 1 Jun 2022 14:36:45 +0000 (23:36 +0900)
commit9ddae155322de3ed2f348629925a18538e96020c
treee3f833ca53a924756d15b0202132965ff8721c90
parent395a09c3dafe0c7838c9ca41d2b47bb5e79a5b6d
parent0a6001b5a03481a323048ef387e31033080ee18f
Rollup merge of #94647 - Urgau:hash-map-many-mut, r=Amanieu

Expose `get_many_mut` and `get_many_unchecked_mut` to HashMap

This pull-request expose the function [`get_many_mut`](https://docs.rs/hashbrown/0.12.0/hashbrown/struct.HashMap.html#method.get_many_mut) and [`get_many_unchecked_mut`](https://docs.rs/hashbrown/0.12.0/hashbrown/struct.HashMap.html#method.get_many_unchecked_mut) from `hashbrown` to the standard library `HashMap` type. They obviously keep the same API and are added under the (new) `map_many_mut` feature.

- `get_many_mut`: Attempts to get mutable references to `N` values in the map at once.
- `get_many_unchecked_mut`: Attempts to get mutable references to `N` values in the map at once, without validating that the values are unique.
library/std/src/collections/hash/map.rs