Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Sep 8, 2024
2 parents 869453c + 5610494 commit 1064405
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/units.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ impl Units {
if size < 10_000 {
size.to_string()
} else {
let size = size as f64;
let i: u32 = (size.ln() / 1024f64.ln()) as u32;
let i = size.ilog2() / 10u32;
let idx = i as usize - 1;
let size = size as f64;
if idx >= PREFIXES.len() {
"huge".to_string()
} else {
Expand Down

0 comments on commit 1064405

Please sign in to comment.