diff options
author | iximeow <me@iximeow.net> | 2024-04-02 02:05:02 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2024-04-02 02:05:02 -0700 |
commit | ed4f238a4c2d860e6fadc8abeaa0cba36ed1df8a (patch) | |
tree | 8081c3c515b33b8dc518df6c1ca2884d435e5ddd /src/long_mode | |
parent | 8b79d597dee1fb554eae9057d51f340dd282fa64 (diff) |
less write, more write_str
Diffstat (limited to 'src/long_mode')
-rw-r--r-- | src/long_mode/display.rs | 9 |
1 files changed, 6 insertions, 3 deletions
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 <T: fmt::Write, Y: YaxColors> 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::Ok, Self::Error> { self.f.write_str(MEM_SIZE_STRINGS[self.instr.mem_size as usize])?; |