3 ms·
The idea here is to separate lifetime of iteration (the scope in which "next" is used 'i) and the lifetime of data ('a), which would result in following signatu
by nercury 10y ago
The idea here is to separate lifetime of iteration (the scope in which "next" is used 'i) and the lifetime of data ('a), which would result in following signature:
fn next<'i>(&'i mut self) -> Option<Vec<&'a T>>
which, thanks to lifetime elision, is the same as
fn next(&mut self) -> Option<Vec<&'a T>>