diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-09-09 21:02:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-09 21:02:27 -0700 |
| commit | fa56cf537ffbb5a1614692422c4f0c728eea037f (patch) | |
| tree | 0723fdde8c9727ca0312bdb397d8d502f131b18b /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | f09372ab609236510187bd61ab1c6b30cfa69014 (diff) | |
| parent | fb1fab5a67955240330038414c23d912766ddeaf (diff) | |
| download | rust-fa56cf537ffbb5a1614692422c4f0c728eea037f.tar.gz rust-fa56cf537ffbb5a1614692422c4f0c728eea037f.zip | |
Rollup merge of #76458 - mbrubeck:hash_drain_filter, r=Amanieu
Add drain_filter method to HashMap and HashSet Add `HashMap::drain_filter` and `HashSet::drain_filter`, implementing part of rust-lang/rfcs#2140. These new methods are unstable. The tracking issue is #59618. The added iterators behave the same as `BTreeMap::drain_filter` and `BTreeSet::drain_filter`, except their iteration order is arbitrary. The unit tests are adapted from `alloc::collections::btree`. This branch rewrites `HashSet` to be a wrapper around `hashbrown::HashSet` rather than `std::collections::HashMap`. (Both are themselves wrappers around `hashbrown::HashMap`, so the in-memory representation is the same either way.) This lets `std` re-use more iterator code from `hashbrown`. Without this change, we would need to duplicate much more code to implement `HashSet::drain_filter`. This branch also updates the `hashbrown` crate to version 0.9.0. Aside from changes related to the `DrainFilter` iterators, this version only changes features that are not used in libstd or rustc. And it updates `indexmap` to version 1.6.0, whose only change is compatibility with `hashbrown` 0.9.0.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
