1
Fork 0

Apply suggested changes

This commit is contained in:
Ethan Brierley 2020-10-26 18:14:12 +00:00
parent 75e6deefee
commit ad2d93da1f
10 changed files with 48 additions and 25 deletions

View file

@ -50,8 +50,10 @@ fn update_limit(
let error_str = match e.kind() {
IntErrorKind::PosOverflow => "`limit` is too large",
IntErrorKind::Empty => "`limit` must be a non-negative integer",
IntErrorKind::InvalidDigit(_) => "not a valid integer",
IntErrorKind::NegOverflow => bug!("`limit` should never underflow"),
IntErrorKind::InvalidDigit => "not a valid integer",
IntErrorKind::NegOverflow => {
bug!("`limit` should never negatively underflow")
}
IntErrorKind::Zero => bug!("zero is a valid `limit`"),
kind => bug!("unimplemented IntErrorKind variant: {:?}", kind),
};