From 96b577860d4e175ccc4698b9e9a8a822b228fc19 Mon Sep 17 00:00:00 2001 From: Andrew Xie Date: Sun, 7 May 2023 21:08:47 -0400 Subject: Fixed failing test + minor cleanup --- compiler/rustc_data_structures/src/unord.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_data_structures/src') diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs index 6c8d5414631..02957b38efe 100644 --- a/compiler/rustc_data_structures/src/unord.rs +++ b/compiler/rustc_data_structures/src/unord.rs @@ -62,6 +62,11 @@ impl> UnordItems { UnordItems(self.0.filter_map(f)) } + #[inline] + pub fn for_each ()>(self, f: F) { + self.0.for_each(|x| f(x)); + } + #[inline] pub fn max(self) -> Option where -- cgit 1.4.1-3-g733a5