-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add new lint for Result<T, E>.map_or(None, Some(T))
#5415
Merged
Merged
Commits on Apr 4, 2020
-
result_map_or_into_option: add lint to catch manually adpating Result…
… -> Option Result<T, E> has an `ok()` method that adapts a Result<T,E> into an Option<T>. It's possible to get around this adapter by writing Result<T,E>.map_or(None, Some). This lint is implemented as a new variant of the existing [`option_map_none` lint](rust-lang#2128)
Configuration menu - View commit details
-
Copy full SHA for 91d8a80 - Browse repository at this point
Copy the full SHA 91d8a80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91759a7 - Browse repository at this point
Copy the full SHA 91759a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a29aed - Browse repository at this point
Copy the full SHA 3a29aedView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0738bd - Browse repository at this point
Copy the full SHA d0738bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb276dc - Browse repository at this point
Copy the full SHA fb276dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for acc3bc1 - Browse repository at this point
Copy the full SHA acc3bc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2533f56 - Browse repository at this point
Copy the full SHA 2533f56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 325d0b6 - Browse repository at this point
Copy the full SHA 325d0b6View commit details
Commits on Apr 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5d54fbb - Browse repository at this point
Copy the full SHA 5d54fbbView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.