diff --git a/library/core/src/iter/adapters/mod.rs b/library/core/src/iter/adapters/mod.rs index d0b89fdbb5843..ca950a138f31c 100644 --- a/library/core/src/iter/adapters/mod.rs +++ b/library/core/src/iter/adapters/mod.rs @@ -155,6 +155,9 @@ where for<'a> F: FnMut(GenericShunt<'a, I, R>) -> U, R: Residual, { + // FIXME(#11084): we might be able to get rid of GenericShunt in favor of + // Iterator::scan, as performance should be comparable + let mut residual = None; let shunt = GenericShunt { iter, residual: &mut residual }; let value = f(shunt); diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 8920ea959eb38..d4dd33b948193 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -2758,9 +2758,6 @@ impl> FromIterator> for Option { /// so the final value of `shared` is 6 (= `3 + 2 + 1`), not 16. #[inline] fn from_iter>>(iter: I) -> Option { - // FIXME(#11084): This could be replaced with Iterator::scan when this - // performance bug is closed. - iter::try_process(iter.into_iter(), |i| i.collect()) } }