cargo fmt --check

This commit is contained in:
Domenico Mastrangelo
2024-06-01 18:23:43 +02:00
parent debf7c3fd3
commit a3234bf8ea

View File

@@ -166,15 +166,13 @@ impl<'a> Printer for SimplePrinter<'a> {
OutputHandle::IoWrite(handle) => { OutputHandle::IoWrite(handle) => {
if self.config.style_components.numbers() { if self.config.style_components.numbers() {
handle.write_all( handle.write_all(
format!( format!("{line_number:4} {}", String::from_utf8_lossy(line_buffer))
"{line_number:4} {}", .as_bytes(),
String::from_utf8_lossy(line_buffer)
).as_bytes()
)?; )?;
} else { } else {
handle.write_all(line_buffer)?; handle.write_all(line_buffer)?;
} }
}, }
OutputHandle::FmtWrite(handle) => { OutputHandle::FmtWrite(handle) => {
write!( write!(
handle, handle,