We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clippy reports no warnings for unnecessary move keyword, such as:
move
let closure = move || value_moved(v);
Here move is unnecessary since there's no reference capture.
If a lint for above is acceptable, we may also have some warnings for belows.
std::thread::spawn(move || { value_moved(v) }
or
tokio::spawn(async move || value_moved_async(v).await})
unnecessary_move
style
No response
move || value_moved(v);
Could be written as:
|| value_moved(v);
The text was updated successfully, but these errors were encountered:
Duplicate of #11721 #8751
Sorry, something went wrong.
Duplicate of #8751
@Kinrany Did you mean to post this on a different issue? #11721 maybe?
🤦 Yes, thank you! (Technically that issue is newer and would be a duplicate of this one, but the former actually has some discussion on it)
No branches or pull requests
What it does
clippy reports no warnings for unnecessary
move
keyword, such as:Here
move
is unnecessary since there's no reference capture.If a lint for above is acceptable, we may also have some warnings for belows.
or
Lint Name
unnecessary_move
Category
style
Advantage
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: