Do not import always NotNan.

Skip it when `arbitrary_precision` is enabled.
This commit is contained in:
Timothée Haudebourg
2021-10-20 13:41:42 +02:00
parent be2f5738ba
commit b59c0c0e55

View File

@@ -1,7 +1,6 @@
use crate::de::ParserNumber;
use crate::error::Error;
use crate::lib::*;
use ordered_float::NotNan;
use serde::de::{self, Unexpected, Visitor};
use serde::{
forward_to_deserialize_any, serde_if_integer128, Deserialize, Deserializer, Serialize,
@@ -13,6 +12,9 @@ use crate::error::ErrorCode;
#[cfg(feature = "arbitrary_precision")]
use serde::de::{IntoDeserializer, MapAccess};
#[cfg(not(feature = "arbitrary_precision"))]
use ordered_float::NotNan;
#[cfg(feature = "arbitrary_precision")]
pub(crate) const TOKEN: &str = "$serde_json::private::Number";