We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
transform if else block into then_some() call if else block returns None
none_else_block
pedantic
No response
let a = true; if a == true { Some("asd") } else { None } | v a.then_some("asd");
The text was updated successfully, but these errors were encountered:
@rustbot claim
Sorry, something went wrong.
@rustbot label +good-first-issue
if_none_blocks
if_then_some_else_none
bool::then_some
05fc1c7
mkrasnitski
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
What it does
transform if else block into then_some() call if else block returns None
Lint Name
none_else_block
Category
pedantic
Advantage
No response
Drawbacks
No response
Example
The text was updated successfully, but these errors were encountered: