Skip to content

Commit

Permalink
Implement size_hint() for ByRef iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
Palmer Cox authored and “Palmer committed Dec 21, 2013
1 parent 2c539d4 commit 765bc90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/iter.rs
Expand Up @@ -795,7 +795,8 @@ pub struct ByRef<'a, T> {
impl<'a, A, T: Iterator<A>> Iterator<A> for ByRef<'a, T> {
#[inline]
fn next(&mut self) -> Option<A> { self.iter.next() }
// FIXME: #9629 we cannot implement &self methods like size_hint on ByRef
#[inline]
fn size_hint(&self) -> (uint, Option<uint>) { self.iter.size_hint() }
}

impl<'a, A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A> for ByRef<'a, T> {
Expand Down

5 comments on commit 765bc90

@bors
Copy link
Contributor

@bors bors commented on 765bc90 Dec 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at DaGenix@765bc90

@bors
Copy link
Contributor

@bors bors commented on 765bc90 Dec 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging DaGenix/rust/remove-unnecessary-fields = 765bc90 into auto

@bors
Copy link
Contributor

@bors bors commented on 765bc90 Dec 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DaGenix/rust/remove-unnecessary-fields = 765bc90 merged ok, testing candidate = 20f13b2

@bors
Copy link
Contributor

@bors bors commented on 765bc90 Dec 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 765bc90 Dec 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 20f13b2

Please sign in to comment.