Guest User

Untitled

a guest
Dec 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. fn main() {
  2. let s = String::from("1\n2\n3\n4\n5");
  3.  
  4. let lines = s.lines();
  5.  
  6. for (i, x) in lines.enumerate() {
  7. for y in i..lines.collect::<Vec<_>>().len() {
  8. // do stuff
  9. }
  10. }
  11. }
Add Comment
Please, Sign In to add comment