Skip to content

Commit

Permalink
dereference the usize instead of clone
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnen committed Nov 11, 2020
1 parent 9e69175 commit 38051a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ impl<'a, T: Eq + Hash + Clone, S: BuildHasher> Iterator for Intersection<'a, T,

let (elem, count) = self.iter.next()?;
let other_count = match self.other.get(elem) {
Some(c) => c.clone(),
Some(c) => *c,
None => 0usize,
};

Expand Down Expand Up @@ -1381,7 +1381,7 @@ impl<'a, T: Eq + Hash, S: BuildHasher> Iterator for Difference<'a, T, S> {

let (elem, count) = self.iter.next()?;
let other_count = match self.other.get(elem) {
Some(c) => c.clone(),
Some(c) => *c,
None => 0usize,
};

Expand Down

0 comments on commit 38051a5

Please sign in to comment.