3 ms·
That is basically a while loop without a "proper body", right? At each iteration advance is called with the closure as first argument and iteration continues un
by anonymous 13y ago
That is basically a while loop without a "proper body", right? At each iteration advance is called with the closure as first argument and iteration continues until it returns false?
- kibwen 13y agoYou're correct. You can see as much here in the implementation of `advance` (as you'd expect, it's very simple): https://github.com/mozilla/rust/blob/master/src/libstd/iterator.rs#L472 https://github.com/mozilla/rust/blob/master/src/libstd/itera...