Commit 946a396
committed
test: Fix an overflow on empty benchmarks
Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:
#[bench]
fn foo(b: &mut test::Bencher) {}
This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.1 parent 1fe8f22 commit 946a396
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1112 | 1119 | | |
1113 | 1120 | | |
1114 | 1121 | | |
| |||
0 commit comments