New lint: Suggest usage of mem::take
#4871
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-complexity
Lint: Belongs in the complexity lint group
mem::take
is being stabilized in v1.40 so I was wondering if we should add a lint to detect occurences ofmem::replace(&mut T, T::default())
and suggest usage ofmem::take(&mut T)
instead.Let me know if this is something that's useful and I can start working on it.
The text was updated successfully, but these errors were encountered: