chore: simplify info and debug output

This commit is contained in:
2025-07-02 17:10:55 +09:00
parent f6447df90e
commit 09a03ab558
3 changed files with 3 additions and 11 deletions

View File

@@ -497,7 +497,7 @@ pub enum CarryUsage {
impl fmt::Display for Computer { impl fmt::Display for Computer {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{} {} {}", self.regs, self.sregs, self.flags) write!(f, "{} {}", self.regs, self.flags)
} }
} }

View File

@@ -99,7 +99,7 @@ impl fmt::Display for Register {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!( write!(
f, f,
"AX({}) BX({}) CX({}) DX({}) SP({:04x}) BP({:04x}) SI({:04x}) DI({:04x})", "{} {} {} {} {:04x} {:04x} {:04x} {:04x}",
self.ax, self.bx, self.cx, self.dx, self.sp, self.bp, self.si, self.di self.ax, self.bx, self.cx, self.dx, self.sp, self.bp, self.si, self.di
) )
} }

View File

@@ -44,15 +44,7 @@ struct Args {
fn main() { fn main() {
Builder::new() Builder::new()
.format(|buf, record| { .format(|buf, record| writeln!(buf, "{}: {}", record.level(), record.args()))
writeln!(
buf,
"{} {}: {}",
record.target(),
record.level(),
record.args()
)
})
.parse_default_env() .parse_default_env()
.init(); .init();