-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New lint: Suggest usage of mem::take #4871
Copy link
Copy link
Closed
Labels
A-lintArea: New lintsArea: New lintsL-complexityLint: Belongs in the complexity lint groupLint: Belongs in the complexity lint groupgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Activity
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsL-complexityLint: Belongs in the complexity lint groupLint: Belongs in the complexity lint groupgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
mem::takeis 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.