Skip to content

Commit

Permalink
remove size_hint from difference
Browse files Browse the repository at this point in the history
without caching some information or reducing over the values of both msets its impossible to provide a size hint better than the default (0, None)
  • Loading branch information
lonnen committed Nov 10, 2020
1 parent 0c7ef7d commit 9e69175
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1389,11 +1389,6 @@ impl<'a, T: Eq + Hash, S: BuildHasher> Iterator for Difference<'a, T, S> {
self.remaining = count.saturating_sub(other_count);
}
}

fn size_hint(&self) -> (usize, Option<usize>) {
let (_, upper) = self.iter.size_hint();
(0, upper)
}
}

impl<T: Eq + Hash + Clone, S: BuildHasher> FusedIterator for Difference<'_, T, S> {}
Expand Down

0 comments on commit 9e69175

Please sign in to comment.