Add size hint to Result's FromIterator implementation.
This commit is contained in:
parent
982a48575b
commit
989eba79a3
1 changed files with 5 additions and 0 deletions
|
@ -1008,6 +1008,11 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> {
|
||||||
None => None,
|
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 };
|
let mut adapter = Adapter { iter: iter.into_iter(), err: None };
|
||||||
|
|
Loading…
Add table
Reference in a new issue