1
0
mirror of https://github.com/sharkdp/bat.git synced 2026-02-08 00:32:08 +00:00

Remove unnecessary code change

This commit is contained in:
Alex Kirk
2025-12-11 05:54:30 +01:00
parent de414ed631
commit 629a8968fc

View File

@@ -151,7 +151,7 @@ impl Printer for SimplePrinter<'_> {
self.config.nonprintable_notation,
);
write!(handle, "{line}")?;
} else if self.config.binary == BinaryBehavior::AsText {
} else {
match handle {
OutputHandle::IoWrite(handle) => handle.write_all(line_buffer)?,
OutputHandle::FmtWrite(handle) => {
@@ -165,13 +165,6 @@ impl Printer for SimplePrinter<'_> {
)?;
}
}
} else {
match handle {
OutputHandle::IoWrite(handle) => handle.write_all(line_buffer)?,
OutputHandle::FmtWrite(handle) => {
write!(handle, "{}", String::from_utf8_lossy(line_buffer))?;
}
}
};
}
Ok(())