We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ok_or
map_or
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
Check for usage of _.map_or(Err(_), Ok).
_.map_or(Err(_), Ok)
option_map_or_err_ok
pedantic
_.ok_or(_)
No response
opt.map_or(Err(e), Ok);
Could be written as:
opt.ok_or(e);
The text was updated successfully, but these errors were encountered:
3664d63
Successfully merging a pull request may close this issue.
What it does
Check for usage of
_.map_or(Err(_), Ok)
.Lint Name
option_map_or_err_ok
Category
pedantic
Advantage
_.ok_or(_)
.Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: