Handle todos

This commit is contained in:
Peter Hebden authored and David Peter committed 2023-09-01 20:52:55 +02:00
1 parent d929becefc
commit 906e774372
2 files changed
+13 -2

No files matched your search

+10 -1
View File
@@ -134,7 +134,16 @@ impl<'a> Printer for SimplePrinter<'a> {
} else {
match handle {
OutputHandle::IoWrite(handle) => handle.write_all(line_buffer)?,
OutputHandle::FmtWrite(handle) => todo!(),
OutputHandle::FmtWrite(handle) => {
write!(
handle,
"{}",
std::str::from_utf8(line_buffer).map_err(|_| Error::Msg(
"encountered invalid utf8 while printing to non-io buffer"
.to_string()
))?
)?;
}
}
};
}