3 ms·
is there a RFC link for this? I got bitten by this once by attempting to return a derived iterator similar to `x.iter().map(...).filter(...)` example you had, b
by jeeyoungk 9y ago
is there a RFC link for this? I got bitten by this once by attempting to return a derived iterator similar to `x.iter().map(...).filter(...)` example you had, but I couldn't figure out the return type of such function as Rust forbids type inferencing for return types.
- kzrdude 9y agoYes it hasn't been properly possible to return such an iterator chain that uses closures before, unless the iterator is manually boxed. With impl Trait that is now fixed. The latest RFC is https://github.com/rust-lang/rfcs/pull/1951 https://github.com/rust-lang/rfcs/pull/1951 ; it was in several.