mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 14:12:31 +00:00
fix regression causing size short to have space
This commit is contained in:
parent
549f559305
commit
20a6a09695
1 changed files with 6 additions and 7 deletions
|
@ -57,14 +57,13 @@ impl Size {
|
||||||
left_pad.push(' ');
|
left_pad.push(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
let strings: &[ColoredString] = &[
|
let mut strings: Vec<ColoredString> = vec![ColoredString::from(left_pad), val_content];
|
||||||
ColoredString::from(left_pad),
|
if flags.size != SizeFlag::Short {
|
||||||
val_content,
|
strings.push(ColoredString::from(" "));
|
||||||
ColoredString::from(" "),
|
}
|
||||||
unit_content,
|
strings.push(unit_content);
|
||||||
];
|
|
||||||
|
|
||||||
let res = ANSIStrings(strings).to_string();
|
let res = ANSIStrings(&strings).to_string();
|
||||||
ColoredString::from(res)
|
ColoredString::from(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue