about summary refs log tree commit diff
path: root/src/libsyntax/util
diff options
context:
space:
mode:
authorFlorian Wilkens <floya@live.de>2014-12-19 21:52:10 +0100
committerFlorian Wilkens <floya@live.de>2014-12-22 12:58:55 +0100
commitf8cfd2480b69a1cc266fc91d0b60c825a9dc18a7 (patch)
tree6d0eff18d899f6a660797fa3fa4265fd59ad4ed7 /src/libsyntax/util
parent34d680009205de2302b902d8f9f5f7ae7a042f1a (diff)
downloadrust-f8cfd2480b69a1cc266fc91d0b60c825a9dc18a7.tar.gz
rust-f8cfd2480b69a1cc266fc91d0b60c825a9dc18a7.zip
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].
Diffstat (limited to 'src/libsyntax/util')
-rw-r--r--src/libsyntax/util/small_vector.rs18
1 files changed, 9 insertions, 9 deletions
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<T> SmallVector<T> {
 
     /// Deprecated: use `into_iter`.
     #[deprecated = "use into_iter"]
-    pub fn move_iter(self) -> MoveItems<T> {
+    pub fn move_iter(self) -> IntoIter<T> {
         self.into_iter()
     }
 
-    pub fn into_iter(self) -> MoveItems<T> {
+    pub fn into_iter(self) -> IntoIter<T> {
         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<T> SmallVector<T> {
     pub fn is_empty(&self) -> bool { self.len() == 0 }
 }
 
-pub struct MoveItems<T> {
-    repr: MoveItemsRepr<T>,
+pub struct IntoIter<T> {
+    repr: IntoIterRepr<T>,
 }
 
-enum MoveItemsRepr<T> {
+enum IntoIterRepr<T> {
     ZeroIterator,
     OneIterator(T),
-    ManyIterator(vec::MoveItems<T>),
+    ManyIterator(vec::IntoIter<T>),
 }
 
-impl<T> Iterator<T> for MoveItems<T> {
+impl<T> Iterator<T> for IntoIter<T> {
     fn next(&mut self) -> Option<T> {
         match self.repr {
             ZeroIterator => None,