mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Add size hint to Result's FromIterator implementation.
This commit is contained in:
parent
982a48575b
commit
989eba79a3
@ -1008,6 +1008,11 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
let (_min, max) = self.iter.size_hint();
|
||||
(0, max)
|
||||
}
|
||||
}
|
||||
|
||||
let mut adapter = Adapter { iter: iter.into_iter(), err: None };
|
||||
|
Loading…
Reference in New Issue
Block a user