Skip to content

Commit

Permalink
Ignore buggy clippy::assigning_clones lint
Browse files Browse the repository at this point in the history
```
error: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> src/stl/mod.rs:613:9
    |
613 |         mesh.name = name.to_owned();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `name.clone_into(&mut mesh.name)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-D clippy::assigning-clones` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::assigning_clones)]`
```
  • Loading branch information
taiki-e committed May 13, 2024
1 parent 169dd66 commit f8d7422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ impl FromStl for Mesh {
mesh.faces.push(vertices_indices);
}

#[allow(clippy::assigning_clones)] // https://github.com/rust-lang/rust-clippy/issues/12502
fn set_name(mesh: &mut Self::Context, name: &str) {
mesh.name = name.to_owned();
}
Expand Down

0 comments on commit f8d7422

Please sign in to comment.