From f8cfd2480b69a1cc266fc91d0b60c825a9dc18a7 Mon Sep 17 00:00:00 2001 From: Florian Wilkens Date: Fri, 19 Dec 2014 21:52:10 +0100 Subject: Renaming of the Iter types as in RFC #344 libcore: slice::Items -> slice::Iter, slice::MutItems -> slice::IterMut libcollections: *::Items -> *::Iter, *::MoveItems -> *::IntoIter, *::MutItems -> *::IterMut This is of course a [breaking-change]. --- src/libsyntax/util/small_vector.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/libsyntax/util') diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index 8d050e34abf..946181770c8 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. use self::SmallVectorRepr::*; -use self::MoveItemsRepr::*; +use self::IntoIterRepr::*; use std::mem; use std::slice; @@ -111,17 +111,17 @@ impl SmallVector { /// Deprecated: use `into_iter`. #[deprecated = "use into_iter"] - pub fn move_iter(self) -> MoveItems { + pub fn move_iter(self) -> IntoIter { self.into_iter() } - pub fn into_iter(self) -> MoveItems { + pub fn into_iter(self) -> IntoIter { let repr = match self.repr { Zero => ZeroIterator, One(v) => OneIterator(v), Many(vs) => ManyIterator(vs.into_iter()) }; - MoveItems { repr: repr } + IntoIter { repr: repr } } pub fn len(&self) -> uint { @@ -135,17 +135,17 @@ impl SmallVector { pub fn is_empty(&self) -> bool { self.len() == 0 } } -pub struct MoveItems { - repr: MoveItemsRepr, +pub struct IntoIter { + repr: IntoIterRepr, } -enum MoveItemsRepr { +enum IntoIterRepr { ZeroIterator, OneIterator(T), - ManyIterator(vec::MoveItems), + ManyIterator(vec::IntoIter), } -impl Iterator for MoveItems { +impl Iterator for IntoIter { fn next(&mut self) -> Option { match self.repr { ZeroIterator => None, -- cgit 1.4.1-3-g733a5