From f8d74229046ab276c88089e2ef39a0890f88507c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 13 May 2024 12:42:37 +0900 Subject: [PATCH] Ignore buggy clippy::assigning_clones lint ``` 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)]` ``` --- src/stl/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stl/mod.rs b/src/stl/mod.rs index 50fead2..fa4c8c3 100644 --- a/src/stl/mod.rs +++ b/src/stl/mod.rs @@ -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(); }