mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:34 +00:00
Simplify is_printable check, closes #78
This commit is contained in:
1 parent
7307077a66
commit
f8f410b8ee
1 file changed
+1
-4
+1
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user