-
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
Improve get_unwrap
suggestion
#3638
Conversation
Handle case where a reference is immediately dereferenced. Fixes 3625
| | ||
LL | *some_vecdeque.get_mut(0).unwrap() = 1; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut some_vecdeque[0]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changed tests were get_mut()
cases, maybe there should be a test for a get()
case too?
I made the changes suggested. |
@bors r+ another bug bites the dust |
📌 Commit d2ea635 has been approved by |
Improve `get_unwrap` suggestion Handle case where a reference is immediately dereferenced. Fixes #3625
☀️ Test successful - status-appveyor, status-travis |
Handle case where a reference is immediately dereferenced.
Fixes #3625