aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer/loggable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer/loggable.rs')
-rw-r--r--src/writer/loggable.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/writer/loggable.rs b/src/writer/loggable.rs
index 82f14a3..1b9f64a 100644
--- a/src/writer/loggable.rs
+++ b/src/writer/loggable.rs
@@ -33,8 +33,8 @@ impl<W> Loggable<W> {
impl<W: AsyncWrite + Unpin + Send> Display for Loggable<W> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- let str = str::from_utf8(&self.log_buffer).unwrap_or("buffer to string conversion failed");
- f.write_str(str)
+ let str = String::from_utf8_lossy(&self.log_buffer);
+ write!(f, "{str}")
}
}