diff --git a/benches/shootout-pidigits.rs b/benches/shootout-pidigits.rs index 9440f66c..f90a6973 100644 --- a/benches/shootout-pidigits.rs +++ b/benches/shootout-pidigits.rs @@ -109,9 +109,9 @@ fn pidigits(n: isize, out: &mut dyn io::Write) -> io::Result<()> { } } - try!(write!(out, "{}", d)); + write!(out, "{}", d)?; if i % 10 == 0 { - try!(write!(out, "\t:{}\n", i)); + write!(out, "\t:{}\n", i)?; } context.eliminate_digit(d); @@ -120,9 +120,9 @@ fn pidigits(n: isize, out: &mut dyn io::Write) -> io::Result<()> { let m = n % 10; if m != 0 { for _ in m..10 { - try!(write!(out, " ")); + write!(out, " ")?; } - try!(write!(out, "\t:{}\n", n)); + write!(out, "\t:{}\n", n)?; } Ok(()) } diff --git a/src/bigint.rs b/src/bigint.rs index 1227b4f9..dc21d3d5 100644 --- a/src/bigint.rs +++ b/src/bigint.rs @@ -694,7 +694,7 @@ impl Num for BigInt { } else { Plus }; - let bu = try!(BigUint::from_str_radix(s, radix)); + let bu = BigUint::from_str_radix(s, radix)?; Ok(BigInt::from_biguint(sign, bu)) } } diff --git a/src/biguint.rs b/src/biguint.rs index 96cbd074..e4049b74 100644 --- a/src/biguint.rs +++ b/src/biguint.rs @@ -2424,7 +2424,7 @@ impl<'de> serde::Deserialize<'de> for BigUint { where D: serde::Deserializer<'de>, { - let data: Vec = try!(Vec::deserialize(deserializer)); + let data: Vec = Vec::deserialize(deserializer)?; Ok(BigUint::new(data)) } }