mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-03 16:34:19 +01:00
@@ -141,7 +141,13 @@ where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
let s = String::deserialize(deserializer)?;
|
||||
s.parse().map_err(serde::de::Error::custom)
|
||||
match crate::numeric::str_to_f64(s) {
|
||||
Some(result) => Ok(match result {
|
||||
crate::numeric::StrToF64::Fractional(non_nan) => non_nan.into(),
|
||||
crate::numeric::StrToF64::Decimal(non_nan) => non_nan.into(),
|
||||
}),
|
||||
None => Err(serde::de::Error::custom("")),
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user