Delete unuseful RangeFull impls
This commit is contained in:
parent
0fca04e1a6
commit
e6a4a3772e
@ -2708,40 +2708,6 @@ mod range_to {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Similar to:
|
||||
//
|
||||
// #[derive(Deserialize)]
|
||||
// #[serde(deny_unknown_fields)]
|
||||
// struct RangeFull;
|
||||
impl<'de> Deserialize<'de> for RangeFull {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
deserializer.deserialize_unit_struct("RangeFull", RangeFullVisitor)
|
||||
}
|
||||
}
|
||||
|
||||
struct RangeFullVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for RangeFullVisitor {
|
||||
type Value = RangeFull;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
formatter.write_str("unit")
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_unit<E>(self) -> Result<Self::Value, E>
|
||||
where
|
||||
E: Error,
|
||||
{
|
||||
Ok(..)
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[cfg(any(not(no_ops_bound), all(feature = "std", not(no_collections_bound))))]
|
||||
impl<'de, T> Deserialize<'de> for Bound<T>
|
||||
where
|
||||
|
@ -180,7 +180,7 @@ mod lib {
|
||||
pub use self::core::fmt::{self, Debug, Display};
|
||||
pub use self::core::marker::{self, PhantomData};
|
||||
pub use self::core::num::Wrapping;
|
||||
pub use self::core::ops::{Range, RangeFrom, RangeFull, RangeTo};
|
||||
pub use self::core::ops::{Range, RangeFrom, RangeTo};
|
||||
pub use self::core::option::{self, Option};
|
||||
pub use self::core::result::{self, Result};
|
||||
|
||||
|
@ -274,17 +274,6 @@ where
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
impl Serialize for RangeFull {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
serializer.serialize_unit_struct("RangeFull")
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[cfg(not(no_range_inclusive))]
|
||||
impl<Idx> Serialize for RangeInclusive<Idx>
|
||||
where
|
||||
|
Loading…
x
Reference in New Issue
Block a user