0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-21 13:49:34 +01:00

Add UnordMap::clear method

This commit is contained in:
Guillaume Gomez 2024-11-20 18:11:37 +01:00
parent 7d40450b2d
commit 186e282a43

View File

@ -602,6 +602,11 @@ impl<K: Eq + Hash, V> UnordMap<K, V> {
.into_iter()
.map(|(_, v)| v)
}
#[inline]
pub fn clear(&mut self) {
self.inner.clear()
}
}
impl<K, Q: ?Sized, V> Index<&Q> for UnordMap<K, V>