Skip to content

Commit 186e282

Browse files
Add UnordMap::clear method
1 parent 7d40450 commit 186e282

File tree

1 file changed

+5
-0
lines changed
  • compiler/rustc_data_structures/src

1 file changed

+5
-0
lines changed

compiler/rustc_data_structures/src/unord.rs

+5
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,11 @@ impl<K: Eq + Hash, V> UnordMap<K, V> {
602602
.into_iter()
603603
.map(|(_, v)| v)
604604
}
605+
606+
#[inline]
607+
pub fn clear(&mut self) {
608+
self.inner.clear()
609+
}
605610
}
606611

607612
impl<K, Q: ?Sized, V> Index<&Q> for UnordMap<K, V>

0 commit comments

Comments
 (0)