fixed a bug where 'B' wasn't showing up (#2690)

right when get_appropriate_unit was called
This commit is contained in:
Darren Schroeder 2020-10-21 14:19:35 -05:00 committed by GitHub
parent 1eb28c6cb6
commit 3cf7652e86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,10 +194,12 @@ impl PrettyDebug for FormatInlineShape {
match byte.get_unit() {
byte_unit::ByteUnit::B => {
let locale_byte = byte.get_value() as u64;
(b::primitive(locale_byte.to_formatted_string(&Locale::en))
+ b::space()
+ b::kind("B"))
.group()
let locale_byte_string = locale_byte.to_formatted_string(&Locale::en);
if filesize_format.1 == "auto" {
(b::primitive(locale_byte_string) + b::space() + b::kind("B")).group()
} else {
(b::primitive(locale_byte_string)).group()
}
}
_ => b::primitive(byte.format(1)),
}