Remove RangeInclusive impl for now
The old impl is inconsistent with the new ops::Range impl.
This commit is contained in:
parent
fcc3c69a49
commit
c488cec641
@ -61,7 +61,7 @@
|
||||
|
||||
#![doc(html_root_url="https://docs.serde.rs")]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(feature = "unstable", feature(inclusive_range, nonzero, specialization, zero_one, into_boxed_c_str))]
|
||||
#![cfg_attr(feature = "unstable", feature(nonzero, specialization, zero_one, into_boxed_c_str))]
|
||||
#![cfg_attr(feature = "alloc", feature(alloc))]
|
||||
#![cfg_attr(feature = "collections", feature(collections))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(linkedlist, type_complexity, doc_markdown))]
|
||||
|
@ -13,8 +13,6 @@ use collections::borrow::ToOwned;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use core::hash::{Hash, BuildHasher};
|
||||
#[cfg(feature = "unstable")]
|
||||
use core::iter;
|
||||
#[cfg(feature = "std")]
|
||||
use std::net;
|
||||
#[cfg(any(feature = "std", feature = "unstable"))]
|
||||
@ -279,25 +277,6 @@ impl<Idx: Serialize> Serialize for ops::Range<Idx> {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#[cfg(feature = "unstable")]
|
||||
impl<A> Serialize for ops::RangeInclusive<A>
|
||||
where ops::RangeInclusive<A>: ExactSizeIterator + iter::Iterator<Item = A> + Clone,
|
||||
A: Serialize
|
||||
{
|
||||
#[inline]
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where S: Serializer
|
||||
{
|
||||
let mut seq = try!(serializer.serialize_seq(Some(self.len())));
|
||||
for e in self.clone() {
|
||||
try!(seq.serialize_element(&e));
|
||||
}
|
||||
seq.end()
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
impl Serialize for () {
|
||||
#[inline]
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
|
@ -71,12 +71,11 @@
|
||||
//! - VecDeque\<T\>
|
||||
//! - Vec\<T\>
|
||||
//! - EnumSet\<T\> (unstable)
|
||||
//! - Range\<T\> (unstable)
|
||||
//! - RangeInclusive\<T\> (unstable)
|
||||
//! - **Miscellaneous standard library types**:
|
||||
//! - Duration
|
||||
//! - Path
|
||||
//! - PathBuf
|
||||
//! - Range\<T\>
|
||||
//! - NonZero\<T\> (unstable)
|
||||
//! - **Net types**:
|
||||
//! - IpAddr
|
||||
|
Loading…
x
Reference in New Issue
Block a user