We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13b91cc commit 74ecf6dCopy full SHA for 74ecf6d
src/output/render/size.rs
@@ -41,9 +41,9 @@ impl f::Size {
41
};
42
43
let symbol = prefix.symbol();
44
- let number = if n < 10_f64 { numerics.format_float(n, 1) }
45
- else { numerics.format_int(n as isize) };
46
-
+ let decimal_to_diplay = if n < 10_f64 { 1 } else { 0 };
+ let number = numerics.format_float(n, decimal_to_diplay);
+
47
// The numbers and symbols are guaranteed to be written in ASCII, so
48
// we can skip the display width calculation.
49
let width = DisplayWidth::from(number.len() + symbol.len());
0 commit comments