Explain this code!

  1. Please check the pinned topic and format your post accordingly.
  2. This code doesn't "work", in that it doesn't do anything when run, as you can see in the playground. Compiler even hints you on the reason why. And by "doesn't do anything" I mean, literally - in release mode it compiles to nothing.
  3. For other questions, see: Vec::iter, Iterator::enumerate, Iterator::map.
5 Likes