std: Rename IntoIterator::Iter to IntoIter

This is in preparation for stabilization of the `IntoIterator` trait. All
implementations and references to `Iter` need to be renamed to `IntoIter`.

[breaking-change]
This commit is contained in:
Alex Crichton 2015-02-06 14:47:55 -08:00
parent 64a4decec7
commit 605225a366
14 changed files with 34 additions and 34 deletions

View File

@ -656,7 +656,7 @@ fn from_iter<Iter: Iterator<Item=T>>(iter: Iter) -> BinaryHeap<T> {
}
impl<T: Ord> IntoIterator for BinaryHeap<T> {
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()
@ -664,7 +664,7 @@ fn into_iter(self) -> IntoIter<T> {
}
impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()

View File

@ -1071,7 +1071,7 @@ fn idx(&mut self, index: usize) -> Option<bool> {
}
impl<'a> IntoIterator for &'a Bitv {
type Iter = Iter<'a>;
type IntoIter = Iter<'a>;
fn into_iter(self) -> Iter<'a> {
self.iter()
@ -1883,7 +1883,7 @@ impl<'a> Iterator for SymmetricDifference<'a> {
}
impl<'a> IntoIterator for &'a BitvSet {
type Iter = SetIter<'a>;
type IntoIter = SetIter<'a>;
fn into_iter(self) -> SetIter<'a> {
self.iter()

View File

@ -463,7 +463,7 @@ pub fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<V> where Q: BorrowFrom<K>
}
impl<K, V> IntoIterator for BTreeMap<K, V> {
type Iter = IntoIter<K, V>;
type IntoIter = IntoIter<K, V>;
fn into_iter(self) -> IntoIter<K, V> {
self.into_iter()
@ -471,7 +471,7 @@ fn into_iter(self) -> IntoIter<K, V> {
}
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
type Iter = Iter<'a, K, V>;
type IntoIter = Iter<'a, K, V>;
fn into_iter(self) -> Iter<'a, K, V> {
self.iter()
@ -479,7 +479,7 @@ fn into_iter(self) -> Iter<'a, K, V> {
}
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
type Iter = IterMut<'a, K, V>;
type IntoIter = IterMut<'a, K, V>;
fn into_iter(mut self) -> IterMut<'a, K, V> {
self.iter_mut()

View File

@ -481,7 +481,7 @@ fn from_iter<Iter: Iterator<Item=T>>(iter: Iter) -> BTreeSet<T> {
}
impl<T> IntoIterator for BTreeSet<T> {
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()
@ -489,7 +489,7 @@ fn into_iter(self) -> IntoIter<T> {
}
impl<'a, T> IntoIterator for &'a BTreeSet<T> {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()

View File

@ -831,7 +831,7 @@ fn from_iter<T: Iterator<Item=A>>(iterator: T) -> DList<A> {
}
impl<T> IntoIterator for DList<T> {
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()
@ -839,7 +839,7 @@ fn into_iter(self) -> IntoIter<T> {
}
impl<'a, T> IntoIterator for &'a DList<T> {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()
@ -847,7 +847,7 @@ fn into_iter(self) -> Iter<'a, T> {
}
impl<'a, T> IntoIterator for &'a mut DList<T> {
type Iter = IterMut<'a, T>;
type IntoIter = IterMut<'a, T>;
fn into_iter(mut self) -> IterMut<'a, T> {
self.iter_mut()

View File

@ -258,7 +258,7 @@ fn from_iter<I:Iterator<Item=E>>(iterator: I) -> EnumSet<E> {
}
impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
type Iter = Iter<E>;
type IntoIter = Iter<E>;
fn into_iter(self) -> Iter<E> {
self.iter()

View File

@ -1608,7 +1608,7 @@ fn from_iter<T: Iterator<Item=A>>(iterator: T) -> RingBuf<A> {
}
impl<T> IntoIterator for RingBuf<T> {
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()
@ -1616,7 +1616,7 @@ fn into_iter(self) -> IntoIter<T> {
}
impl<'a, T> IntoIterator for &'a RingBuf<T> {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()
@ -1624,7 +1624,7 @@ fn into_iter(self) -> Iter<'a, T> {
}
impl<'a, T> IntoIterator for &'a mut RingBuf<T> {
type Iter = IterMut<'a, T>;
type IntoIter = IterMut<'a, T>;
fn into_iter(mut self) -> IterMut<'a, T> {
self.iter_mut()

View File

@ -1388,7 +1388,7 @@ fn from_iter<I:Iterator<Item=T>>(iterator: I) -> Vec<T> {
}
impl<T> IntoIterator for Vec<T> {
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()
@ -1396,7 +1396,7 @@ fn into_iter(self) -> IntoIter<T> {
}
impl<'a, T> IntoIterator for &'a Vec<T> {
type Iter = slice::Iter<'a, T>;
type IntoIter = slice::Iter<'a, T>;
fn into_iter(self) -> slice::Iter<'a, T> {
self.iter()
@ -1404,7 +1404,7 @@ fn into_iter(self) -> slice::Iter<'a, T> {
}
impl<'a, T> IntoIterator for &'a mut Vec<T> {
type Iter = slice::IterMut<'a, T>;
type IntoIter = slice::IterMut<'a, T>;
fn into_iter(mut self) -> slice::IterMut<'a, T> {
self.iter_mut()

View File

@ -669,7 +669,7 @@ fn from_iter<Iter: Iterator<Item=(usize, V)>>(iter: Iter) -> VecMap<V> {
}
impl<T> IntoIterator for VecMap<T> {
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()
@ -677,7 +677,7 @@ fn into_iter(self) -> IntoIter<T> {
}
impl<'a, T> IntoIterator for &'a VecMap<T> {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()
@ -685,7 +685,7 @@ fn into_iter(self) -> Iter<'a, T> {
}
impl<'a, T> IntoIterator for &'a mut VecMap<T> {
type Iter = IterMut<'a, T>;
type IntoIter = IterMut<'a, T>;
fn into_iter(mut self) -> IterMut<'a, T> {
self.iter_mut()

View File

@ -49,7 +49,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
}
impl<'a, T> IntoIterator for &'a [T; $N] {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()
@ -57,7 +57,7 @@ fn into_iter(self) -> Iter<'a, T> {
}
impl<'a, T> IntoIterator for &'a mut [T; $N] {
type Iter = IterMut<'a, T>;
type IntoIter = IterMut<'a, T>;
fn into_iter(self) -> IterMut<'a, T> {
self.iter_mut()

View File

@ -120,14 +120,14 @@ pub trait FromIterator<A> {
/// Conversion into an `Iterator`
pub trait IntoIterator {
type Iter: Iterator;
type IntoIter: Iterator;
/// Consumes `Self` and returns an iterator over it
fn into_iter(self) -> Self::Iter;
fn into_iter(self) -> Self::IntoIter;
}
impl<I> IntoIterator for I where I: Iterator {
type Iter = I;
type IntoIter = I;
fn into_iter(self) -> I {
self

View File

@ -628,7 +628,7 @@ fn default() -> &'a [T] { &[] }
//
impl<'a, T> IntoIterator for &'a [T] {
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()
@ -636,7 +636,7 @@ fn into_iter(self) -> Iter<'a, T> {
}
impl<'a, T> IntoIterator for &'a mut [T] {
type Iter = IterMut<'a, T>;
type IntoIter = IterMut<'a, T>;
fn into_iter(self) -> IterMut<'a, T> {
self.iter_mut()

View File

@ -1377,7 +1377,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S>
S: HashState<Hasher=H>,
H: hash::Hasher<Output=u64>
{
type Iter = Iter<'a, K, V>;
type IntoIter = Iter<'a, K, V>;
fn into_iter(self) -> Iter<'a, K, V> {
self.iter()
@ -1389,7 +1389,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S>
S: HashState<Hasher=H>,
H: hash::Hasher<Output=u64>
{
type Iter = IterMut<'a, K, V>;
type IntoIter = IterMut<'a, K, V>;
fn into_iter(mut self) -> IterMut<'a, K, V> {
self.iter_mut()
@ -1401,7 +1401,7 @@ impl<K, V, S, H> IntoIterator for HashMap<K, V, S>
S: HashState<Hasher=H>,
H: hash::Hasher<Output=u64>
{
type Iter = IntoIter<K, V>;
type IntoIter = IntoIter<K, V>;
fn into_iter(self) -> IntoIter<K, V> {
self.into_iter()

View File

@ -840,7 +840,7 @@ impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S>
S: HashState<Hasher=H>,
H: hash::Hasher<Output=u64>
{
type Iter = Iter<'a, T>;
type IntoIter = Iter<'a, T>;
fn into_iter(self) -> Iter<'a, T> {
self.iter()
@ -852,7 +852,7 @@ impl<T, S, H> IntoIterator for HashSet<T, S>
S: HashState<Hasher=H>,
H: hash::Hasher<Output=u64>
{
type Iter = IntoIter<T>;
type IntoIter = IntoIter<T>;
fn into_iter(self) -> IntoIter<T> {
self.into_iter()