Skip to content

Commit cd05f5d

Browse files
committed
numfmt: apply suffix after scaling
1 parent c409373 commit cd05f5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/uu/numfmt/src/format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ fn transform_to(
487487
precision: usize,
488488
unit_separator: &str,
489489
) -> Result<String> {
490-
let (i2, s) = consider_suffix(s, opts.to, round_method, precision)?;
491-
let i2 = i2 / (opts.to_unit as f64);
490+
let i2 = s / (opts.to_unit as f64);
491+
let (i2, s) = consider_suffix(i2, opts.to, round_method, precision)?;
492492
Ok(match s {
493493
None => {
494494
format!(

0 commit comments

Comments
 (0)