diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/opt_vec.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index bf8c5ae462b..8e2da3d6eb1 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -146,4 +146,12 @@ impl<'self, T> Iterator<&'self T> for OptVecIterator<'self, T> { None => None } } + + #[inline] + fn size_hint(&self) -> (uint, Option<uint>) { + match self.iter { + Some(ref x) => x.size_hint(), + None => (0, Some(0)) + } + } } |
