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.
if let
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
Does it have any design for if let in match arm guard?
match "foobar" { s if let Some(tail) = tail.strip_prefix("bar") => dbg!(tail), _ => "barbaz", }
Without if let, I have to indent the if expression a bit:
if
match "foobar" { s => { if let Some(tail) = tail.strip_prefix("bar") { dbg!(tail) } else { "barbaz" } } }
The text was updated successfully, but these errors were encountered:
There's an accepted RFC about this - https://github.com/rust-lang/rfcs/blob/master/text/2294-if-let-guard.md
Sorry, something went wrong.
Thanks. So if let for guard hasn't been implemented. Should I close this issue for #51114 instead ?
Duplicate of #51114
No branches or pull requests
Does it have any design for
if let
in match arm guard?Without
if let
, I have to indent theif
expression a bit:The text was updated successfully, but these errors were encountered: