Commit 137d14c
committed
Resolve mem_replace_with_default clippy lint
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> src/expand.rs:195:30
|
195 | let bounds = mem::replace(&mut param.bounds, Punctuated::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut param.bounds)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
= note: `-W clippy::mem-replace-with-default` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::mem_replace_with_default)]`
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
--> src/expand.rs:206:30
|
206 | let bounds = mem::replace(&mut param.bounds, Punctuated::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut param.bounds)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default1 parent 45fd82a commit 137d14c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
0 commit comments