Skip to content

Commit 587c7d8

Browse files
committed
Fix overflow in the test
1 parent ebafe58 commit 587c7d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/tests/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ fn test_take_try_folds() {
16871687

16881688
#[test]
16891689
fn test_flat_map_try_folds() {
1690-
let f = &|acc, x| i32::checked_add(2*acc, x);
1690+
let f = &|acc, x| i32::checked_add(acc*2/3, x);
16911691
let mr = &|x| (5*x)..(5*x + 5);
16921692
assert_eq!((0..10).flat_map(mr).try_fold(7, f), (0..50).try_fold(7, f));
16931693
assert_eq!((0..10).flat_map(mr).try_rfold(7, f), (0..50).try_rfold(7, f));

0 commit comments

Comments
 (0)