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 c81c450 commit 3cae6c6Copy full SHA for 3cae6c6
src/uu/df/src/blocks.rs
@@ -105,7 +105,9 @@ pub(crate) fn to_magnitude_and_suffix(
105
} else {
106
let tenths_place = rem / (bases[i] / 10);
107
108
- if rem % (bases[i] / 10) == 0 {
+ if quot >= 100 && rem > 0 {
109
+ format!("{}{suffix}", quot + 1)
110
+ } else if rem % (bases[i] / 10) == 0 {
111
format!("{quot}.{tenths_place}{suffix}")
112
} else if tenths_place + 1 == 10 || quot >= 10 {
113
let quot = quot + 1;
0 commit comments