From 92a03acfb8cd4663188b958f383c3c24c94eed7d Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 26 Jun 2019 21:43:01 -0700 Subject: fix warnings --- src/armv8/a64.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/armv8') diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index e3953e3..d640292 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -5,6 +5,7 @@ use std::fmt::{Display, Formatter}; use yaxpeax_arch::{Arch, Colorize, Colored, ColorSettings, Decodable, LengthedInstruction, ShowContextual, YaxColors}; +#[allow(non_snake_case)] mod docs { #[test] fn test_ones() { @@ -25,7 +26,7 @@ mod docs { if len == 0 { return 0; } if len == 64 { return 0xffffffff_ffffffffu64; } - let mask = (0x8000_0000_0000_0000i64 >> ((64 - 1) - len)) as u64; + let mask = ((0x8000_0000_0000_0000u64 as i64) >> ((64 - 1) - len)) as u64; !mask } @@ -526,25 +527,25 @@ impl Display for Instruction { }; if self.operands[0] != Operand::Nothing { - write!(fmt, " {}", self.operands[0]); + write!(fmt, " {}", self.operands[0])?; } else { return Ok(()); } if self.operands[1] != Operand::Nothing { - write!(fmt, ", {}", self.operands[1]); + write!(fmt, ", {}", self.operands[1])?; } else { return Ok(()); } if self.operands[2] != Operand::Nothing { - write!(fmt, ", {}", self.operands[2]); + write!(fmt, ", {}", self.operands[2])?; } else { return Ok(()); } if self.operands[3] != Operand::Nothing { - write!(fmt, ", {}", self.operands[3]); + write!(fmt, ", {}", self.operands[3])?; } else { return Ok(()); } -- cgit v1.1