diff --git a/src/printer.rs b/src/printer.rs index 499106ec..52ba50e9 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -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(())