From aa79e826869a7fed8df6b4f7e7a7503565659f89 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 29 May 2019 00:07:31 -0700 Subject: fix some warnings and rdtsc/swapgs decode errors --- test/test.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test.rs b/test/test.rs index f8dadbb..ebfda5a 100644 --- a/test/test.rs +++ b/test/test.rs @@ -4,7 +4,7 @@ extern crate yaxpeax_x86; use std::fmt::Write; use yaxpeax_arch::Decodable; -use yaxpeax_x86::{Instruction, Opcode, decode_one}; +use yaxpeax_x86::{Instruction, decode_one}; fn decode(bytes: &[u8]) -> Option { let mut instr = Instruction::invalid(); @@ -17,7 +17,7 @@ fn decode(bytes: &[u8]) -> Option { fn test_display(data: &[u8], expected: &'static str) { let mut hex = String::new(); for b in data { - write!(hex, "{:02x}", b); + write!(hex, "{:02x}", b).unwrap(); } match Instruction::decode(data.into_iter().map(|x| *x)) { Some(instr) => { @@ -60,6 +60,7 @@ fn test_arithmetic() { } #[test] +#[allow(non_snake_case)] fn test_E_decode() { test_display(&[0xff, 0x75, 0xb8], "push [rbp - 0x48]"); test_display(&[0xff, 0x75, 0x08], "push [rbp + 0x8]"); -- cgit v1.1