Skip to content

Commit ba24605

Browse files
Merge #385
385: Fix potential overflow in MergeJoinBy::size_hint r=jswrenn a=andrewhickman Co-authored-by: Andrew Hickman <[email protected]>
2 parents dd7fd96 + 9f41c18 commit ba24605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/merge_join.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<I, J, F> Iterator for MergeJoinBy<I, J, F>
7878
let lower = ::std::cmp::max(a_lower, b_lower);
7979

8080
let upper = match (a_upper, b_upper) {
81-
(Some(x), Some(y)) => Some(x + y),
81+
(Some(x), Some(y)) => x.checked_add(y),
8282
_ => None,
8383
};
8484

0 commit comments

Comments
 (0)