Tidy up amount calculation

This commit is contained in:
2026-06-03 09:16:46 +02:00
parent c9e005475c
commit 14d0d82719
+1 -3
View File
@@ -18,9 +18,7 @@ fn parse_amount_str(amount_str: &str) -> Result<i64, Error> {
let frac = format!("{:0<2}", frac);
let frac = frac.parse::<i64>()?;
let mut amount: i64 = 0;
amount += whole * 100 * 10;
amount += frac * 10;
let amount = whole * 100 * 10 + frac * 10;
Ok(if negative { -amount } else { amount })
}