(mut iterator: I)
| 1006 | // 2. `from_trusted_len_iter_bool` is faster. |
| 1007 | #[inline] |
| 1008 | pub unsafe fn from_trusted_len_iter_bool<I: Iterator<Item = bool>>(mut iterator: I) -> Self { |
| 1009 | let (_, upper) = iterator.size_hint(); |
| 1010 | let len = upper.expect("from_trusted_len_iter requires an upper limit"); |
| 1011 | |
| 1012 | Self::collect_bool(len, |_| iterator.next().unwrap()) |
| 1013 | } |
| 1014 | |
| 1015 | /// Creates a [`MutableBuffer`] from an [`Iterator`] with a trusted (upper) length or errors |
| 1016 | /// if any of the items of the iterator is an error. |
nothing calls this directly
no test coverage detected