aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-06-26 21:43:01 -0700
committeriximeow <me@iximeow.net>2020-01-12 17:28:07 -0800
commit92a03acfb8cd4663188b958f383c3c24c94eed7d (patch)
treec9e9f178f6c6444cb7db94f28d2ad3e18a4c99ce
parentc3c921435028e42abdd25268ebf546337ecfb755 (diff)
fix warnings
-rw-r--r--src/armv8/a64.rs11
1 files changed, 6 insertions, 5 deletions
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(());
}