Skip to content

Commit

Permalink
fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Sep 23, 2024
1 parent ee25054 commit 2c6dffa
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ext/rust_decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ impl ConvertFrom<&Decimal> for DecimalConversion {

impl ConvertFrom<DecimalConversion> for Decimal {
fn convert_from(value: DecimalConversion) -> Self {
let mut ret = Self::from_parts(
value.0,
value.1,
value.2,
false,
value.3.scale(),
);
let mut ret = Self::from_parts(value.0, value.1, value.2, false, value.3.scale());
ret.set_sign_negative(value.3.negative());
ret
}
Expand Down Expand Up @@ -94,7 +88,7 @@ mod tests {
Decimal::from(1) / Decimal::from(2),
Decimal::from(1),
Decimal::from(999999999999999999u64),
Decimal::from_str("3.100").unwrap()
Decimal::from_str("3.100").unwrap(),
];
for v in vs {
let d = decode::<Decimal>(&encode(&v)).unwrap();
Expand Down

0 comments on commit 2c6dffa

Please sign in to comment.