1
Fork 0

remove some uses of try!

This commit is contained in:
Mark Mansi 2018-12-01 15:48:55 -06:00
parent d48ab693d1
commit e7e96921c2
11 changed files with 25 additions and 27 deletions

View file

@ -264,7 +264,7 @@ pub mod printf {
match *self {
Num::Num(n) => write!(s, "{}", n),
Num::Arg(n) => {
let n = try!(n.checked_sub(1).ok_or(::std::fmt::Error));
let n = n.checked_sub(1).ok_or(::std::fmt::Error)?;
write!(s, "{}$", n)
},
Num::Next => write!(s, "*"),