From f87d5d33c50adc6c7112945e61b23e4c4dd3e83c Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 2 Aug 2020 20:32:06 -0700 Subject: warnings-b-gon --- src/long_mode/mod.rs | 14 +++++++++----- test/long_mode/mod.rs | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 40f7904..61ae89f 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -3327,6 +3327,7 @@ struct EmbeddedOperandInstructions { } impl EmbeddedOperandInstructions { + #[allow(unused)] fn bits(&self) -> u16 { self.bits } @@ -3362,7 +3363,8 @@ impl OperandCodeBuilder { self } - fn op0_is_rrr(&self) -> bool { + #[allow(unused)] + const fn op0_is_rrr(&self) -> bool { self.bits & 0x2000 != 0 } @@ -3380,6 +3382,7 @@ impl OperandCodeBuilder { } } + #[allow(unused)] fn special_case_handler_index(&self) -> u16 { self.bits & 0x1ff } @@ -3440,6 +3443,7 @@ impl OperandCodeBuilder { (self.bits & 0x0800) != 0 } + #[allow(unused)] const fn has_mem_reg(&self) -> bool { (self.bits & 0x0400) != 0 } @@ -5713,10 +5717,10 @@ fn read_operands>(decoder: &InstDecoder, mut bytes_iter: T, } return Ok(()); }, - Err(embedded_operand_instructions) => { - if operand_code.op0_is_rrr() { - } - } + // EmbeddedOperandInstructions but those are entirely handled in the fall-through + // below. one day this may grow to be an `Err(the_operand_instructions)` though, so for + // a simpler diff the above is pre-`match`/`Ok`'d. + _ => {} } } diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index 8f041e9..ca4670c 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -4,7 +4,7 @@ mod operand; use std::fmt::Write; use yaxpeax_arch::{AddressBase, Decoder, LengthedInstruction}; -use yaxpeax_x86::long_mode::{DecodeError, InstDecoder, Opcode}; +use yaxpeax_x86::long_mode::{InstDecoder, Opcode}; fn test_invalid(data: &[u8]) { test_invalid_under(&InstDecoder::default(), data); -- cgit v1.1