diff options
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/unord.rs | 5 |
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, |
