diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-22 12:49:57 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-22 12:49:57 -0800 |
| commit | 459f3b2cfa0e618d6e28ce564a363a9477567f71 (patch) | |
| tree | 4d308abea1b026ac9db0e538f6d01170b173c89f /src/libsyntax/util | |
| parent | 6938d51122f37dd7ab213b88bc2d457c5a9da781 (diff) | |
| parent | 22050e3ed44d9b4d79edced506b470a425e0d302 (diff) | |
| download | rust-459f3b2cfa0e618d6e28ce564a363a9477567f71.tar.gz rust-459f3b2cfa0e618d6e28ce564a363a9477567f71.zip | |
rollup merge of #20056: MrFloya/iter_rename
Conflicts: src/libcollections/bit.rs src/libcore/str.rs
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 18 |
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, |
