Simplify is_printable check, closes #78

This commit is contained in:
sharkdp committed 2020-06-07 15:26:07 +02:00
1 parent 7307077a66
commit f8f410b8ee
1 file changed
+1 -4
+1 -4
View File
@@ -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