MCPcopy Create free account
hub / github.com/hashintel/hash / from_iter

Method from_iter

libs/error-stack/src/report.rs:966–975  ·  view source on GitHub ↗
(iter: T)

Source from the content-addressed store, hash-verified

964
965impl<C> FromIterator<Report<C>> for Option<Report<[C]>> {
966 fn from_iter<T: IntoIterator<Item = Report<C>>>(iter: T) -> Self {
967 let mut iter = iter.into_iter();
968
969 let mut base = iter.next()?.expand();
970 for rest in iter {
971 base.push(rest);
972 }
973
974 Some(base)
975 }
976}
977
978impl<C> FromIterator<Report<[C]>> for Option<Report<[C]>> {

Callers

nothing calls this directly

Calls 5

expandMethod · 0.80
pushMethod · 0.65
appendMethod · 0.65
into_iterMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected