Skip to content

Commit f629dd2

Browse files
committed
Revert "Simplifying stringification"
This reverts commit a815986.
1 parent b935fb3 commit f629dd2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,11 @@ where
301301
#[cfg(not(feature = "echo"))]
302302
{
303303
// Echo the command
304-
context.write_all(b"\r").unwrap();
305-
context.write_all(&self.buffer[..self.used]).unwrap();
304+
write!(context, "\r").unwrap();
305+
if let Ok(s) = core::str::from_utf8(&self.buffer[0..self.used]) {
306+
write!(context, "{}", s).unwrap();
307+
}
306308
}
307-
308309
// Handle the command
309310
self.process_command(context);
310311
Outcome::CommandProcessed

0 commit comments

Comments
 (0)