Clippy3: error message from clippy not inline with the intent
In this part of code clippy error message not inline with the intent.
https://github.com/rust-lang/rustlings/blob/fbfd4f25e7e715007f5f3f6678f5d336d24d3660/exercises/22_clippy/clippy3.rs#L20-L21
Because the solution stated that this is about using clear instead of resize.
https://github.com/rust-lang/rustlings/blob/fbfd4f25e7e715007f5f3f6678f5d336d24d3660/solutions/22_clippy/clippy3.rs#L20-L23
Additionally
if my_option.is_none() {
println!("{:?}", my_option.unwrap());
}
triggers in clippy:
help: remove the `None` and `unwrap()`
triggers in me:
if my_option.is_none() {
println!("{:?}", my_option);
}
and it passes the test and I feel I got the point, but the solution tells me otherwise ...
I feel like this exercise is intended to show the common mistakes when writing in Rust Mostly the common mistake is using resize and expecting the mutated vec as a return result Shouldn't this be left as it is? I guess, that the fixed error you've got in pull request should be discovered by the learner