Skip to content

Commit f4f36ec

Browse files
committed
use correct divisor
1 parent df87212 commit f4f36ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ fn to_string_decimal(bytes: u64, si_prefix: bool, f: &mut fmt::Formatter) -> fmt
254254
for (&size, &prefix) in unit_sizes.iter().zip(unit_prefix.iter()) {
255255
ideal_size = size;
256256
ideal_prefix = prefix;
257-
if size <= bytes && bytes / 1_000 < size {
257+
if size <= bytes && bytes / unit_sizes[0] < size {
258258
break;
259259
}
260260
}

0 commit comments

Comments
 (0)