From 186e282a43f384d456579ab50c5d6a48fd5cca1b Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 20 Nov 2024 18:11:37 +0100 Subject: [PATCH] Add `UnordMap::clear` method --- compiler/rustc_data_structures/src/unord.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs index bafb16a8b5e67..34895d3efe6ca 100644 --- a/compiler/rustc_data_structures/src/unord.rs +++ b/compiler/rustc_data_structures/src/unord.rs @@ -602,6 +602,11 @@ impl UnordMap { .into_iter() .map(|(_, v)| v) } + + #[inline] + pub fn clear(&mut self) { + self.inner.clear() + } } impl Index<&Q> for UnordMap