Skip to content

Commit fe047e0

Browse files
committed
iterator: cleanup
1 parent 45426c3 commit fe047e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libstd/iterator.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ pub trait Iterator<A> {
174174
/// assert!(it.peek().is_none());
175175
/// assert!(it.next().is_none());
176176
/// ~~~
177+
#[inline]
177178
fn peekable(self) -> Peekable<A, Self> {
178179
Peekable{iter: self, peeked: None}
179180
}
@@ -931,17 +932,15 @@ impl<'self, A, B, T: Iterator<A>> Iterator<B> for Map<'self, A, B, T> {
931932
}
932933
}
933934

934-
impl<'self, A, B, T: DoubleEndedIterator<A>> DoubleEndedIterator<B>
935-
for Map<'self, A, B, T> {
935+
impl<'self, A, B, T: DoubleEndedIterator<A>> DoubleEndedIterator<B> for Map<'self, A, B, T> {
936936
#[inline]
937937
fn next_back(&mut self) -> Option<B> {
938938
let next = self.iter.next_back();
939939
self.do_map(next)
940940
}
941941
}
942942

943-
impl<'self, A, B, T: RandomAccessIterator<A>> RandomAccessIterator<B>
944-
for Map<'self, A, B, T> {
943+
impl<'self, A, B, T: RandomAccessIterator<A>> RandomAccessIterator<B> for Map<'self, A, B, T> {
945944
#[inline]
946945
fn indexable(&self) -> uint {
947946
self.iter.indexable()

0 commit comments

Comments
 (0)