From 8221d7cdbdd59afb200f5b86735d8696dbeb8fc8 Mon Sep 17 00:00:00 2001 From: iximeow Date: Wed, 19 Jun 2024 14:28:49 -0700 Subject: more warning cleanup --- src/long_mode/display.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/long_mode') diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 535fc75..da138bb 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -885,8 +885,8 @@ impl DisplaySink for alloc::string::String { Ok(()) } - fn span_enter(&mut self, ty: TokenType) {} - fn span_end(&mut self, ty: TokenType) {} + fn span_enter(&mut self, _ty: TokenType) {} + fn span_end(&mut self, _ty: TokenType) {} } impl DisplaySink for BigEnoughString { @@ -1260,8 +1260,8 @@ impl DisplaySink for BigEnoughString { Ok(()) } - fn span_enter(&mut self, ty: TokenType) {} - fn span_end(&mut self, ty: TokenType) {} + fn span_enter(&mut self, _ty: TokenType) {} + fn span_end(&mut self, _ty: TokenType) {} } impl BigEnoughString { @@ -4709,7 +4709,7 @@ fn contextualize_intel(instr: &Instruction, out: &mut T) -> fmt: } if instr.operands[0 as usize].is_memory() { - unsafe { out.write_lt_8(MEM_SIZE_STRINGS.get_kinda_unchecked(instr.mem_size as usize))? }; + unsafe { out.write_lt_8(mem_size_label(instr.mem_size))? }; if let Some(prefix) = instr.segment_override_for_op(0) { let name = prefix.name(); out.write_char(' ')?; @@ -4735,7 +4735,7 @@ fn contextualize_intel(instr: &Instruction, out: &mut T) -> fmt: } if instr.operands[i as usize].is_memory() { - unsafe { out.write_lt_8(MEM_SIZE_STRINGS.get_kinda_unchecked(instr.mem_size as usize))? }; + unsafe { out.write_lt_8(mem_size_label(instr.mem_size))? }; if i >= 4 { unsafe { core::hint::unreachable_unchecked(); } } @@ -5151,7 +5151,7 @@ fn contextualize_c(instr: &Instruction, _address: u64, _context: } impl <'instr, T: fmt::Write, Y: YaxColors> ShowContextual for InstructionDisplayer<'instr> { - fn contextualize(&self, colors: &Y, address: u64, context: Option<&NoContext>, out: &mut T) -> fmt::Result { + fn contextualize(&self, _colors: &Y, address: u64, context: Option<&NoContext>, out: &mut T) -> fmt::Result { let InstructionDisplayer { instr, style, -- cgit v1.1