mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-15 00:00:18 +02:00
print space normally in Debug for Bytes (#155)
This commit is contained in:
committed by
Carl Lerche
parent
c8c46d8513
commit
cfca1c04fa
+2
-2
@@ -27,8 +27,8 @@ impl<'a> fmt::Debug for BsDebug<'a> {
|
||||
try!(write!(fmt, "\\{}", c as char));
|
||||
} else if c == b'\0' {
|
||||
try!(write!(fmt, "\\0"));
|
||||
// ASCII printable except space
|
||||
} else if c > 0x20 && c < 0x7f {
|
||||
// ASCII printable
|
||||
} else if c >= 0x20 && c < 0x7f {
|
||||
try!(write!(fmt, "{}", c as char));
|
||||
} else {
|
||||
try!(write!(fmt, "\\x{:02x}", c));
|
||||
|
||||
Reference in New Issue
Block a user