Add unformated memory total to example

This commit is contained in:
Richard 2022-03-16 19:42:40 -03:00
parent 53538b65b1
commit d9853165e7

View file

@ -91,9 +91,15 @@ impl Application for Example {
.to_string()) .to_string())
)); ));
let memory_readable =
ByteSize::kb(information.memory_total).to_string();
let memory_total = Text::new(format!( let memory_total = Text::new(format!(
"Memory (total): {}", "Memory (total): {}",
ByteSize::kb(information.memory_total).to_string() format!(
"{} kb ({})",
information.memory_total, memory_readable
)
)); ));
Column::with_children(vec![ Column::with_children(vec![