Skip to content

Commit 812917b

Browse files
authored
Fix system memory calculation and formatting (#182)
1 parent 0001737 commit 812917b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/banner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ pub fn system_info() {
2727
{}
2828
OS: {}
2929
Processor: {} logical, {} physical
30-
Memory: {} GiB total",
30+
Memory: {:.2} GiB total",
3131
"System:".to_string().blue().bold(),
3232
os_info::get(),
3333
num_cpus::get(),
3434
num_cpus::get_physical(),
35-
system.total_memory() / (1024 * 1024)
35+
system.total_memory() as f32 / (1024 * 1024 * 1024) as f32
3636
)
3737
}
3838

0 commit comments

Comments
 (0)