Skip to content

Commit

Permalink
Simplify is_printable check, closes #78
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Jun 7, 2020
1 parent 7307077 commit f8f410b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8f410b

Please sign in to comment.