diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 5dd823a2..b9543c83 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -10,8 +10,6 @@ use std::collections::{ }; #[cfg(feature = "nightly")] use collections::enum_set::{CLike, EnumSet}; -#[cfg(feature = "nightly")] -use collections::vec_map::VecMap; use std::hash::Hash; use std::marker::PhantomData; use std::path; @@ -719,64 +717,6 @@ map_impl!( /////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "nightly")] -pub struct VecMapVisitor { - marker: PhantomData>, -} - -#[cfg(feature = "nightly")] -impl VecMapVisitor { - #[inline] - pub fn new() -> Self { - VecMapVisitor { - marker: PhantomData, - } - } -} - -#[cfg(feature = "nightly")] -impl Visitor for VecMapVisitor - where V: Deserialize, -{ - type Value = VecMap; - - #[inline] - fn visit_unit(&mut self) -> Result, E> - where E: Error, - { - Ok(VecMap::new()) - } - - #[inline] - fn visit_map(&mut self, mut visitor: V_) -> Result, V_::Error> - where V_: MapVisitor, - { - let (len, _) = visitor.size_hint(); - let mut values = VecMap::with_capacity(len); - - while let Some((key, value)) = try!(visitor.visit()) { - values.insert(key, value); - } - - try!(visitor.end()); - - Ok(values) - } -} - -#[cfg(feature = "nightly")] -impl Deserialize for VecMap - where V: Deserialize, -{ - fn deserialize(deserializer: &mut D) -> Result, D::Error> - where D: Deserializer, - { - deserializer.visit_map(VecMapVisitor::new()) - } -} - -/////////////////////////////////////////////////////////////////////////////// - struct PathBufVisitor; impl Visitor for PathBufVisitor { diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 96064ecb..d120f130 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -6,7 +6,7 @@ //! leaving serde to perform roughly the same speed as a hand written serializer for a specific //! type. #![doc(html_root_url="https://serde-rs.github.io/serde/serde")] -#![cfg_attr(feature = "nightly", feature(collections, core, enumset, nonzero, step_trait, vecmap, zero_one))] +#![cfg_attr(feature = "nightly", feature(collections, core, enumset, nonzero, step_trait, zero_one))] extern crate num; diff --git a/serde/src/ser/impls.rs b/serde/src/ser/impls.rs index 9f37d434..8a31b4af 100644 --- a/serde/src/ser/impls.rs +++ b/serde/src/ser/impls.rs @@ -10,8 +10,6 @@ use std::collections::{ }; #[cfg(feature = "nightly")] use collections::enum_set::{CLike, EnumSet}; -#[cfg(feature = "nightly")] -use std::collections::vec_map::VecMap; use std::hash::Hash; #[cfg(feature = "nightly")] use std::iter; @@ -558,18 +556,6 @@ impl Serialize for HashMap } } -#[cfg(feature = "nightly")] -impl Serialize for VecMap - where V: Serialize, -{ - #[inline] - fn serialize(&self, serializer: &mut S) -> Result<(), S::Error> - where S: Serializer, - { - serializer.visit_map(MapIteratorVisitor::new(self.iter(), Some(self.len()))) - } -} - /////////////////////////////////////////////////////////////////////////////// impl<'a, T: ?Sized> Serialize for &'a T where T: Serialize {