Converts all try! macros to ? syntax.

Fixes #46
This commit is contained in:
rep-nop
2017-02-25 22:12:33 -05:00
committed by Jakob Stoklund Olesen
parent c8be39fa9d
commit 7459fee71a
22 changed files with 270 additions and 270 deletions

View File

@@ -49,10 +49,10 @@ impl Display for Imm64 {
// 0xffff_ffff_fff8_4400
//
let mut pos = (64 - x.leading_zeros() - 1) & 0xf0;
try!(write!(f, "0x{:04x}", (x >> pos) & 0xffff));
write!(f, "0x{:04x}", (x >> pos) & 0xffff)?;
while pos > 0 {
pos -= 16;
try!(write!(f, "_{:04x}", (x >> pos) & 0xffff));
write!(f, "_{:04x}", (x >> pos) & 0xffff)?;
}
Ok(())
}
@@ -178,7 +178,7 @@ fn format_float(bits: u64, w: u8, t: u8, f: &mut Formatter) -> fmt::Result {
// All formats share the leading sign.
if sign_bit != 0 {
try!(write!(f, "-"));
write!(f, "-")?;
}
if e_bits == 0 {