about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorAndrew Xie <ndrew.xie@gmail.com>2023-05-07 21:08:47 -0400
committerAndrew Xie <ndrew.xie@gmail.com>2023-06-04 21:55:32 -0400
commit96b577860d4e175ccc4698b9e9a8a822b228fc19 (patch)
treebd9efda346de27dc61a0206a020c40906f50b6f6 /compiler/rustc_data_structures/src
parentcf7dea571695be5db843519db014785c4a0a2786 (diff)
downloadrust-96b577860d4e175ccc4698b9e9a8a822b228fc19.tar.gz
rust-96b577860d4e175ccc4698b9e9a8a822b228fc19.zip
Fixed failing test + minor cleanup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/unord.rs5
1 files changed, 5 insertions, 0 deletions
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
@@ -63,6 +63,11 @@ impl<T, I: Iterator<Item = T>> UnordItems<T, I> {
     }
 
     #[inline]
+    pub fn for_each<F: Fn(T) -> ()>(self, f: F) {
+        self.0.for_each(|x| f(x));
+    }
+
+    #[inline]
     pub fn max(self) -> Option<T>
     where
         T: Ord,