Skip to content

Commit

Permalink
Panic when invalid overflow value is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Feb 4, 2017
1 parent b78e956 commit f8a4e3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/int/mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ mod tests {
let mut overflow = 2;
let r = f(a, b, &mut overflow);
if overflow != 0 && overflow != 1 {
return None
panic!("Invalid value {} for overflow", overflow);
}
Some((r, overflow))
}
Expand All @@ -114,7 +114,7 @@ mod tests {
let mut overflow = 2;
let r = f(a, b, &mut overflow);
if overflow != 0 && overflow != 1 {
return None
panic!("Invalid value {} for overflow", overflow);
}
Some((r, overflow))
}
Expand All @@ -138,7 +138,7 @@ mod tests_i128 {
let mut overflow = 2;
let r = f(a, b, &mut overflow);
if overflow != 0 && overflow != 1 {
return None
panic!("Invalid value {} for overflow", overflow);
}
Some((r, overflow))
}
Expand Down

0 comments on commit f8a4e3f

Please sign in to comment.