-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
new lint: passing 0 as length to Vec::resize #5444
Comments
I can implement this. |
Are you still working on this, @JarredAllen? Otherwise, I could have a go at it. |
I had said I would do this thinking that the other issue I was working on would wrap up quickly, but then it turned out that there was more to do (and I now also have to deal with finals). If you want to handle this, feel free to do so. |
@mlegner are you still active on this one? |
@montrivo I'm sorry, I completely forgot about this issue. 😞 |
Thanks for the quick answer. I'll take a look at it. |
… r=yaahc,flip1995 new lint: vec_resize_to_zero implements rust-lang#5444 changelog: new lint vec_resize_to_zero
…ip1995 new lint: vec_resize_to_zero implements #5444 changelog: new lint vec_resize_to_zero
this should have been closed by #5637 |
Clippy should inform about passing
0
as length to resize. It's not useful, and it's likely a mistake caused by swapping the parameter order.Example code:
The text was updated successfully, but these errors were encountered: