Jan. 13th, 2020

Ok, can we pass a function that consumes items instead of returning an Iterator?
error[E0666]: nested `impl Trait` is not allowed
   --> src/main.rs:103:63
    |
103 |    fn scan<T>(&mut self, z: T, mut f: impl FnMut(HeapElement, impl std::io::Read, T) -> T) -> std::io::Result<T> {
    |                                       ------------------------^^^^^^^^^^^^^^^^^^---------
    |                                       |                       |
    |                                       |                       nested `impl Trait` here
    |                                       outer `impl Trait`
Computer says "no".

Profile

sassa_nf

January 2026

S M T W T F S
    123
45678910
111213141516 17
18192021222324
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 21st, 2026 02:15 am
Powered by Dreamwidth Studios