mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
Implement size_hint() for ByRef iterator
This commit is contained in:
parent
2c539d4eec
commit
765bc9064f
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user