Skip to content

Commit 47d4da2

Browse files
sylvestrecakebaker
authored andcommitted
ls: simplify canonicalize_indicator_value
1 parent 8db0642 commit 47d4da2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/uu/ls/src/colors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ fn parse_indicator_codes() -> (FxHashMap<Indicator, String>, bool) {
786786
}
787787

788788
fn canonicalize_indicator_value(value: &str) -> Cow<'_, str> {
789-
if value.len() == 1 && value.chars().all(|c| c.is_ascii_digit()) {
789+
if value.len() == 1 && value.as_bytes()[0].is_ascii_digit() {
790790
let mut canonical = String::with_capacity(2);
791791
canonical.push('0');
792792
canonical.push_str(value);

0 commit comments

Comments
 (0)