diff options
author | 2022-01-24 08:58:05 +0000 | |
---|---|---|
committer | 2022-01-24 09:58:05 +0100 | |
commit | 0e3b2466f199375031006857164fbf70e3ea479f (patch) | |
tree | db22384c238a578fde1c7f4572338fa7744b6876 /src/fmt/debug.rs | |
parent | 68afb40df9ea2e61a93d0e26f6f8a9f231979452 (diff) | |
download | bytes-0e3b2466f199375031006857164fbf70e3ea479f.tar.gz bytes-0e3b2466f199375031006857164fbf70e3ea479f.tar.zst bytes-0e3b2466f199375031006857164fbf70e3ea479f.zip |
Address various clippy warnings (#528)
Diffstat (limited to 'src/fmt/debug.rs')
-rw-r--r-- | src/fmt/debug.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fmt/debug.rs b/src/fmt/debug.rs index a854551..83de695 100644 --- a/src/fmt/debug.rs +++ b/src/fmt/debug.rs @@ -25,7 +25,7 @@ impl Debug for BytesRef<'_> { } else if b == b'\0' { write!(f, "\\0")?; // ASCII printable - } else if b >= 0x20 && b < 0x7f { + } else if (0x20..0x7f).contains(&b) { write!(f, "{}", b as char)?; } else { write!(f, "\\x{:02x}", b)?; @@ -38,12 +38,12 @@ impl Debug for BytesRef<'_> { impl Debug for Bytes { fn fmt(&self, f: &mut Formatter<'_>) -> Result { - Debug::fmt(&BytesRef(&self.as_ref()), f) + Debug::fmt(&BytesRef(self.as_ref()), f) } } impl Debug for BytesMut { fn fmt(&self, f: &mut Formatter<'_>) -> Result { - Debug::fmt(&BytesRef(&self.as_ref()), f) + Debug::fmt(&BytesRef(self.as_ref()), f) } } |