I'm iterating through a file like this:
for line in file.lines() {
if line == something {
println!("{}", line);
}
}
This works great, but how can I get the line that's coming in the next iteration of the loop?
something like this would be great:
for line in file.lines() {
if line == something {
println!("{}", line);
line.next();
println!("{}", line); // This would be the next line coming in the file
}
}