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
In case the loop only contains a single match statement, with either an empty block or a break, while_let_loop should IMO not be reported, since the code communicates a slightly different intention.
A loop with a single, empty match communicates, that driving the iterator/stream/generator/... to completion is the main focus, while a while loop communicates, that the iterator/stream/generator/... is just a source of data and not the main focus.
Description
In case the
loop
only contains a singlematch
statement, with either an empty block or abreak
,while_let_loop
should IMO not be reported, since the code communicates a slightly different intention.A
loop
with a single, emptymatch
communicates, that driving the iterator/stream/generator/... to completion is the main focus, while awhile
loop communicates, that the iterator/stream/generator/... is just a source of data and not the main focus.Small example: playground
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: