Skip to content

Commit 0817e93

Browse files
committed
---
yaml --- r: 175278 b: refs/heads/master c: a13e721 h: refs/heads/master v: v3
1 parent d5279c8 commit 0817e93

File tree

2 files changed

+6
-25
lines changed

2 files changed

+6
-25
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 8ea6f78cf6779a933e2dd859efee995932ef1371
2+
refs/heads/master: a13e7212025e5339133126d129e64fe8e7aff84b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 777435990e0e91df6b72ce80c9b6fa485eeb5daa
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547

trunk/src/libcore/iter.rs

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,10 +1088,7 @@ impl<'a, I> DoubleEndedIterator for ByRef<'a, I> where I: 'a + DoubleEndedIterat
10881088
}
10891089

10901090
#[stable]
1091-
impl<'a, I> ExactSizeIterator for ByRef<'a, I> where I: 'a + ExactSizeIterator {
1092-
#[inline]
1093-
fn len(&self) -> uint { self.iter.len() }
1094-
}
1091+
impl<'a, I> ExactSizeIterator for ByRef<'a, I> where I: 'a + ExactSizeIterator {}
10951092

10961093
/// A trait for iterators over elements which can be added together
10971094
#[unstable = "needs to be re-evaluated as part of numerics reform"]
@@ -1797,14 +1794,7 @@ impl<T, I> Iterator for Peekable<T, I> where I: Iterator<Item=T> {
17971794
}
17981795

17991796
#[stable]
1800-
impl<T, I> ExactSizeIterator for Peekable<T, I> where I: ExactSizeIterator<Item = T> {
1801-
#[inline]
1802-
fn len(&self) -> usize {
1803-
// This is guarenteed to not overflow because `len()` must have been able to return a valid
1804-
// value before we peeked.
1805-
self.iter.len() + if self.peeked.is_some() { 1 } else { 0 }
1806-
}
1807-
}
1797+
impl<T, I> ExactSizeIterator for Peekable<T, I> where I: ExactSizeIterator<Item = T> {}
18081798

18091799
#[stable]
18101800
impl<T, I> Peekable<T, I> where I: Iterator<Item=T> {
@@ -1999,10 +1989,7 @@ impl<I> RandomAccessIterator for Skip<I> where I: RandomAccessIterator{
19991989
}
20001990

20011991
#[stable]
2002-
impl<I> ExactSizeIterator for Skip<I> where I: ExactSizeIterator {
2003-
#[inline]
2004-
fn len(&self) -> uint { self.iter.len().saturating_sub(self.n) }
2005-
}
1992+
impl<I> ExactSizeIterator for Skip<I> where I: ExactSizeIterator {}
20061993

20071994
/// An iterator that only iterates over the first `n` iterations of `iter`.
20081995
#[derive(Clone)]
@@ -2060,10 +2047,7 @@ impl<I> RandomAccessIterator for Take<I> where I: RandomAccessIterator{
20602047
}
20612048

20622049
#[stable]
2063-
impl<I> ExactSizeIterator for Take<I> where I: ExactSizeIterator {
2064-
#[inline]
2065-
fn len(&self) -> uint { cmp::min(self.iter.len(), self.n) }
2066-
}
2050+
impl<I> ExactSizeIterator for Take<I> where I: ExactSizeIterator {}
20672051

20682052

20692053
/// An iterator to maintain state while iterating another iterator
@@ -2275,10 +2259,7 @@ impl<I> RandomAccessIterator for Fuse<I> where I: RandomAccessIterator {
22752259
}
22762260

22772261
#[stable]
2278-
impl<I> ExactSizeIterator for Fuse<I> where I: ExactSizeIterator {
2279-
#[inline]
2280-
fn len(&self) -> uint { self.iter.len() }
2281-
}
2262+
impl<I> ExactSizeIterator for Fuse<I> where I: ExactSizeIterator {}
22822263

22832264
impl<I> Fuse<I> {
22842265
/// Resets the fuse such that the next call to .next() or .next_back() will

0 commit comments

Comments
 (0)