Guess the language by the error
Jan. 13th, 2020 02:47 pmOk, can we pass a function that consumes items instead of returning an Iterator?
Computer says "no".
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`