From ed4f238a4c2d860e6fadc8abeaa0cba36ed1df8a Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 2 Apr 2024 02:05:02 -0700 Subject: less write, more write_str --- src/long_mode/display.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/long_mode') diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 5237868..644bd82 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -449,11 +449,14 @@ impl crate::long_mode::OperandVisitor for Colorizi self.f.write_str(MEM_SIZE_STRINGS[self.instr.mem_size as usize])?; self.f.write_str(" ")?; if let Some(prefix) = self.instr.segment_override_for_op(self.op_nr) { - write!(self.f, "{}:", prefix)?; + write!(self.f, "{}", prefix)?; + self.f.write_str(":")?; } - write!(self.f, "[{} ", regspec_label(®))?; + self.f.write_str("[")?; + self.f.write_str(regspec_label(®))?; + self.f.write_str(" ")?; format_number_i32(self.colors, self.f, disp, NumberStyleHint::HexSignedWithSignSplit)?; - write!(self.f, "]") + self.f.write_str("]") } fn visit_deref(&mut self, reg: RegSpec) -> Result { self.f.write_str(MEM_SIZE_STRINGS[self.instr.mem_size as usize])?; -- cgit v1.1