diff options
author | 2017-08-17 10:28:06 -0700 | |
---|---|---|
committer | 2017-08-17 10:28:06 -0700 | |
commit | cfca1c04fa1c0b0948c3eb046d1113788e639a01 (patch) | |
tree | 4402cfee30ce448712fed8e929ed0f11403b5a23 /src | |
parent | c8c46d8513a9641fc2cf480a998db4fd837ef113 (diff) | |
download | bytes-cfca1c04fa1c0b0948c3eb046d1113788e639a01.tar.gz bytes-cfca1c04fa1c0b0948c3eb046d1113788e639a01.tar.zst bytes-cfca1c04fa1c0b0948c3eb046d1113788e639a01.zip |
print space normally in Debug for Bytes (#155)
Diffstat (limited to 'src')
-rw-r--r-- | src/debug.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug.rs b/src/debug.rs index abead05..f8b830a 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -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)); |