We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would find it useful for if_chain to also support while let.
while let
if_chain! { if let Some(b) = a; while let Ok(c) = b; if let Some(d) = c; then { do_something_with_d(d); } }
becomes:
if let Some(b) = a { while let Ok(c) = b { if let Some(d) = c { do_something_with_d(d); } } }
I'm not sure how/if this should work with the else block. Perhaps something like the following could be done.
if_chain! { if let Some(b) = a; while let Ok(c) = b; if let Some(d) = c; then { do_something_with_d(d); } else { do_something_else(); } }
if let Some(b) = a { let mut __executed = false; while let Ok(c) = b { __executed = true; if let Some(d) = c { do_something_with_d(d); } else { do_something_else(); } } if !__executed { do_something_else(); } } else { do_something_else(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would find it useful for if_chain to also support
while let
.becomes:
I'm not sure how/if this should work with the else block. Perhaps something like the following could be done.
becomes:
The text was updated successfully, but these errors were encountered: