Skip to content

Commit

Permalink
Add UnordMap::clear method
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 20, 2024
1 parent 7d40450 commit 186e282
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_data_structures/src/unord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 186e282

Please sign in to comment.