Update to the last Rust syntax.

Use the new `for` .. `in` loop.
Take in account the new associativity of the `as` keyword.