Applied nits
This commit is contained in:
parent
3f324a8b7d
commit
0cac8455e6
3 changed files with 13 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue