You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loop {
let bi = match bodies.next() {
Some(bi) => bi,
None => break
};
...
}
can be replaced with a simple while let:
while let Some(bi) = bodies.next() {
...
}
Loop-match-breaks don't do anything bad, but they decrease readability and make control flow more confusing. Are there any cases where while-let would not suffice?
The text was updated successfully, but these errors were encountered:
Loop-match-break constructs like this snippet stolen from the benchmarks game:
can be replaced with a simple
while let
:Loop-match-breaks don't do anything bad, but they decrease readability and make control flow more confusing. Are there any cases where while-let would not suffice?
The text was updated successfully, but these errors were encountered: