8000 Simplify check for "ByteCategory::AsciiPrintable" · Issue #78 · sharkdp/hexyl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Simplify check for "ByteCategory::AsciiPrintable" #78
Closed
@rendner

Description

@rendner

hexyl/src/lib.rs

Lines 38 to 40 in 67b6c25

} else if self.0.is_ascii_alphanumeric()
|| self.0.is_ascii_punctuation()
|| self.0.is_ascii_graphic()

I guess that can be simplified to just look for is_ascii_graphic:

else if  self.0.is_ascii_graphic()

I would also prefer to change the name of the variable "AsciiPrintable", because "printable" normally also includes the space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0