mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
0765536c0b
Stabilize or_insert_with_key Stabilizes the `or_insert_with_key` feature from https://github.com/rust-lang/rust/issues/71024. This allows inserting key-derived values when a `HashMap`/`BTreeMap` entry is vacant. The difference between this and `.or_insert_with(|| ... )` is that this provides a reference to the key to the closure after it is moved with `.entry(key_being_moved)`, avoiding the need to copy or clone the key. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |