compose: use melib::Bytes pretty print for attachment size

jmap-eventsource
Manos Pitsidianakis 2020-10-10 17:54:42 +03:00
parent 0ca7b0042e
commit 39fab67523
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 3 additions and 3 deletions

View File

@ -532,11 +532,11 @@ impl Composer {
if let Some(name) = a.content_type().name() { if let Some(name) = a.content_type().name() {
write_string_to_grid( write_string_to_grid(
&format!( &format!(
"[{}] \"{}\", {} {} bytes", "[{}] \"{}\", {} {}",
i, i,
name, name,
a.content_type(), a.content_type(),
a.raw.len() melib::Bytes(a.raw.len())
), ),
grid, grid,
theme_default.fg, theme_default.fg,
@ -547,7 +547,7 @@ impl Composer {
); );
} else { } else {
write_string_to_grid( write_string_to_grid(
&format!("[{}] {} {} bytes", i, a.content_type(), a.raw.len()), &format!("[{}] {} {}", i, a.content_type(), melib::Bytes(a.raw.len())),
grid, grid,
theme_default.fg, theme_default.fg,
theme_default.bg, theme_default.bg,