rust/library/alloc
Jonas Schievink aa685e2024
Rollup merge of #79026 - mbrubeck:btree_retain, r=m-ou-se
Implement BTreeMap::retain and BTreeSet::retain

Adds new methods `BTreeMap::retain` and `BTreeSet::retain`.  These are implemented on top of `drain_filter` (#70530).

The API of these methods is identical to `HashMap::retain` and `HashSet::retain`, which were implemented in #39560 and stabilized in #36648.  The docs and tests are also copied from HashMap/HashSet.

The new methods are unstable, behind the `btree_retain` feature gate, with tracking issue #79025.  See also rust-lang/rfcs#1338.
2020-11-15 13:39:54 +01:00
..
benches Reorder benches const variable 2020-09-29 21:39:24 +08:00
src Rollup merge of #79026 - mbrubeck:btree_retain, r=m-ou-se 2020-11-15 13:39:54 +01:00
tests Rollup merge of #76718 - poliorcetics:vec-ui-to-unit-test, r=jyn514 2020-11-05 10:29:35 +01:00
Cargo.toml mv std libs to library/ 2020-07-27 19:51:13 -05:00