New lint: mem_replace_option_with_some

`mem::replace(opt, Some(v))` can be replaced by `opt.replace(v)`.
This commit is contained in:
Samuel Tardieu 2025-02-11 13:46:55 +01:00
parent 39bde6d46a
commit 342ac8ee28
9 changed files with 133 additions and 3 deletions

View file

@ -633,6 +633,7 @@ define_Conf! {
map_unwrap_or,
map_with_unused_argument_over_ranges,
match_like_matches_macro,
mem_replace_option_with_some,
mem_replace_with_default,
missing_const_for_fn,
needless_borrow,