Skip to content

Commit

Permalink
Fix potential overflow in MergeJoinBy::size_hint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhickman committed Nov 23, 2019
1 parent dd7fd96 commit 9f41c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/merge_join.rs
Expand Up @@ -78,7 +78,7 @@ impl<I, J, F> Iterator for MergeJoinBy<I, J, F>
let lower = ::std::cmp::max(a_lower, b_lower);

let upper = match (a_upper, b_upper) {
(Some(x), Some(y)) => Some(x + y),
(Some(x), Some(y)) => x.checked_add(y),
_ => None,
};

Expand Down

0 comments on commit 9f41c18

Please sign in to comment.