diff options
author | sharkdp <davidpeter@web.de> | 2020-06-07 15:26:07 +0200 |
---|---|---|
committer | sharkdp <davidpeter@web.de> | 2020-06-07 15:26:07 +0200 |
commit | f8f410b8ee39ad083700b308495d2c025e522b25 (patch) | |
tree | 27756f6df3b1cf3fff1a68c76fbdc5ff65648587 | |
parent | 7307077a666254880d19d99276113ef9b6606fc2 (diff) |
Simplify is_printable check, closes #78v0.8.0
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -34,10 +34,7 @@ impl Byte { fn category(self) -> ByteCategory { if self.0 == 0x00 { ByteCategory::Null - } else if self.0.is_ascii_alphanumeric() - || self.0.is_ascii_punctuation() - || self.0.is_ascii_graphic() - { + } else if self.0.is_ascii_graphic() { ByteCategory::AsciiPrintable } else if self.0.is_ascii_whitespace() { ByteCategory::AsciiWhitespace |