diff options
| author | Andrew Xie <ndrew.xie@gmail.com> | 2023-05-07 21:08:47 -0400 |
|---|---|---|
| committer | Andrew Xie <ndrew.xie@gmail.com> | 2023-06-04 21:55:32 -0400 |
| commit | 96b577860d4e175ccc4698b9e9a8a822b228fc19 (patch) | |
| tree | bd9efda346de27dc61a0206a020c40906f50b6f6 /compiler/rustc_data_structures/src | |
| parent | cf7dea571695be5db843519db014785c4a0a2786 (diff) | |
| download | rust-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.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, |
