diff --git a/src/types/external/big_decimal.rs b/src/types/external/big_decimal.rs index af3eea95..049ad0a0 100644 --- a/src/types/external/big_decimal.rs +++ b/src/types/external/big_decimal.rs @@ -14,12 +14,12 @@ impl ScalarType for BigDecimal { } if let Some(f) = n.as_i64() { - return Ok(BigDecimal::from(f)); + return Ok(BigDecimal::from(f)); } // unwrap safe here, because we have check the other possibility Ok(BigDecimal::from(n.as_u64().unwrap())) - }, + } Value::String(s) => Ok(BigDecimal::from_str(s)?), _ => Err(InputValueError::expected_type(value)), } @@ -28,4 +28,4 @@ impl ScalarType for BigDecimal { fn to_value(&self) -> Value { Value::String(self.to_string()) } -} \ No newline at end of file +} diff --git a/src/types/external/decimal.rs b/src/types/external/decimal.rs index e1d5f299..dca544b3 100644 --- a/src/types/external/decimal.rs +++ b/src/types/external/decimal.rs @@ -15,12 +15,12 @@ impl ScalarType for Decimal { } if let Some(f) = n.as_i64() { - return Ok(Decimal::from(f)); + return Ok(Decimal::from(f)); } // unwrap safe here, because we have check the other possibility Ok(Decimal::from(n.as_u64().unwrap())) - }, + } _ => Err(InputValueError::expected_type(value)), } } diff --git a/src/types/external/mod.rs b/src/types/external/mod.rs index 45c842b9..f9086efb 100644 --- a/src/types/external/mod.rs +++ b/src/types/external/mod.rs @@ -15,6 +15,8 @@ mod string; #[cfg(feature = "tokio-sync")] mod tokio; +#[cfg(feature = "bigdecimal")] +mod big_decimal; #[cfg(feature = "bson")] mod bson; #[cfg(feature = "chrono-tz")] @@ -23,8 +25,6 @@ mod chrono_tz; mod datetime; #[cfg(feature = "decimal")] mod decimal; -#[cfg(feature = "bigdecimal")] -mod big_decimal; #[cfg(feature = "chrono-duration")] mod duration; #[cfg(feature = "chrono")]