Fix decimal build.

This commit is contained in:
Stephen Chung 2021-06-16 19:44:54 +08:00
parent c492fa3234
commit 0b028dc900

View File

@ -31,7 +31,7 @@ impl Serialize for Dynamic {
#[cfg(feature = "decimal")]
#[cfg(not(feature = "f32_float"))]
Union::Decimal(x, _, _) => {
Union::Decimal(ref x, _, _) => {
use rust_decimal::prelude::ToPrimitive;
if let Some(v) = x.to_f64() {
@ -42,7 +42,7 @@ impl Serialize for Dynamic {
}
#[cfg(feature = "decimal")]
#[cfg(feature = "f32_float")]
Union::Decimal(x, _, _) => {
Union::Decimal(ref x, _, _) => {
use rust_decimal::prelude::ToPrimitive;
if let Some(v) = x.to_f32() {