mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:34 +00:00
Adjust color function to not include character_table
This commit is contained in:
1 parent
7ca00279ed
commit
a56b3b0c46
1 file changed
+7
-9
+7
-9
@@ -61,16 +61,14 @@ impl Byte {
|
||||
}
|
||||
}
|
||||
|
||||
fn color(self, character_table: CharacterTable) -> &'static [u8] {
|
||||
fn color(self) -> &'static [u8] {
|
||||
use crate::ByteCategory::*;
|
||||
match character_table {
|
||||
CharacterTable::AsciiOnly | CharacterTable::CP437 => match self.category() {
|
||||
Null => COLOR_NULL,
|
||||
AsciiPrintable => COLOR_ASCII_PRINTABLE,
|
||||
AsciiWhitespace => COLOR_ASCII_WHITESPACE,
|
||||
AsciiOther => COLOR_ASCII_OTHER,
|
||||
NonAscii => COLOR_NONASCII,
|
||||
},
|
||||
match self.category() {
|
||||
Null => COLOR_NULL,
|
||||
AsciiPrintable => COLOR_ASCII_PRINTABLE,
|
||||
AsciiWhitespace => COLOR_ASCII_WHITESPACE,
|
||||
AsciiOther => COLOR_ASCII_OTHER,
|
||||
NonAscii => COLOR_NONASCII,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user