diff options
| author | Andrew Xie <ndrew.xie@gmail.com> | 2023-06-11 22:45:04 -0400 |
|---|---|---|
| committer | Andrew Xie <ndrew.xie@gmail.com> | 2023-06-11 22:45:04 -0400 |
| commit | 0cac8455e6f7587228458ef5607e8d3e6f71f347 (patch) | |
| tree | 820777ff4389130e3cfcf9bea5dccf8d3d73c27a /compiler/rustc_data_structures/src | |
| parent | 3f324a8b7d62f44f97ba76eeb76b67d6ff0bf744 (diff) | |
| download | rust-0cac8455e6f7587228458ef5607e8d3e6f71f347.tar.gz rust-0cac8455e6f7587228458ef5607e8d3e6f71f347.zip | |
Applied nits
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/unord.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs index e18c7b415f6..2b21815b687 100644 --- a/compiler/rustc_data_structures/src/unord.rs +++ b/compiler/rustc_data_structures/src/unord.rs @@ -107,6 +107,10 @@ impl<T, I: Iterator<Item = T>> UnordItems<T, I> { { UnordItems(self.0.flat_map(f)) } + + pub fn collect<C: From<UnordItems<T, I>>>(self) -> C { + self.into() + } } impl<T> UnordItems<T, std::iter::Empty<T>> { @@ -161,10 +165,6 @@ impl<T: Ord, I: Iterator<Item = T>> UnordItems<T, I> { items.sort_by_cached_key(|x| x.to_stable_hash_key(hcx)); items } - - pub fn collect<C: From<UnordItems<T, I>>>(self) -> C { - self.into() - } } /// This is a set collection type that tries very hard to not expose |
