chore: simplify info and debug output
This commit is contained in:
@@ -497,7 +497,7 @@ pub enum CarryUsage {
|
||||
|
||||
impl fmt::Display for Computer {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{} {} {}", self.regs, self.sregs, self.flags)
|
||||
write!(f, "{} {}", self.regs, self.flags)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ impl fmt::Display for Register {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(
|
||||
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
|
||||
)
|
||||
}
|
||||
|
||||
10
src/main.rs
10
src/main.rs
@@ -44,15 +44,7 @@ struct Args {
|
||||
|
||||
fn main() {
|
||||
Builder::new()
|
||||
.format(|buf, record| {
|
||||
writeln!(
|
||||
buf,
|
||||
"{} {}: {}",
|
||||
record.target(),
|
||||
record.level(),
|
||||
record.args()
|
||||
)
|
||||
})
|
||||
.format(|buf, record| writeln!(buf, "{}: {}", record.level(), record.args()))
|
||||
.parse_default_env()
|
||||
.init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user