Skip to content

Add actual suggestion for explicit_iter_loop #1484

@killercup

Description

@killercup

Just got this one:

warning: it is more idiomatic to loop over `&mut tris` instead of `tris.iter_mut()`, #[warn(explicit_iter_loop)] on by default
  --> src/ocean.rs:71:13
   |
71 |               for tri in tris.iter_mut() {
   |  _____________^ starting here...
72 | |                 (*tri).subdivide();
73 | |             }
   | |_____________^ ...ending here
   |
   = help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#explicit_iter_loop

I thought to myself, if only rustfix could apply that "&mut tris instead of tris.iter_mut()" part! 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions