Commit f770921
committed
Resolve assigning_clones clippy lint
warning: assigning the result of `Clone::clone()` may be inefficient
--> impl/src/ast.rs:85:21
|
85 | *display = attrs.display.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `display.clone_from(&attrs.display)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
warning: assigning the result of `Clone::clone()` may be inefficient
--> impl/src/expand.rs:158:9
|
158 | display_implied_bounds = display.implied_bounds.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `display_implied_bounds.clone_from(&display.implied_bounds)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
warning: assigning the result of `Clone::clone()` may be inefficient
--> impl/src/expand.rs:402:21
|
402 | display_implied_bounds = display.implied_bounds.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `display_implied_bounds.clone_from(&display.implied_bounds)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones1 parent 1d106b1 commit f770921
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
0 commit comments