diff --git a/src/entities/fractions/currency_amount.rs b/src/entities/fractions/currency_amount.rs index 9c93b6e..f747f72 100644 --- a/src/entities/fractions/currency_amount.rs +++ b/src/entities/fractions/currency_amount.rs @@ -115,10 +115,8 @@ impl CurrencyAmount { significant_digits: u8, rounding: Option, ) -> Result { - (self.as_fraction() / Fraction::new(self.decimal_scale.clone(), 1)).to_significant( - significant_digits, - Some(rounding.unwrap_or_default()), - ) + (self.as_fraction() / Fraction::new(self.decimal_scale.clone(), 1)) + .to_significant(significant_digits, Some(rounding.unwrap_or_default())) } /// Convert the currency amount to a string with a fixed number of decimal places @@ -132,10 +130,8 @@ impl CurrencyAmount { return Err(Error::Invalid("DECIMALS")); } Ok( - (self.as_fraction() / Fraction::new(self.decimal_scale.clone(), 1)).to_fixed( - decimal_places, - Some(rounding.unwrap_or_default()), - ), + (self.as_fraction() / Fraction::new(self.decimal_scale.clone(), 1)) + .to_fixed(decimal_places, Some(rounding.unwrap_or_default())), ) }