Open nicklockwood opened 2 weeks ago
Automatically convert loops with a nested if statement to a where clause:
for foo in bar { if foo ... { } }
becomes
for foo in bar where foo ... { }
And maybe also the inverse, convert where to a guard:
where
guard
for foo in bar where foo { ... }
to
for foo in bar { guard foo else { continue } ... }
Automatically convert loops with a nested if statement to a where clause:
becomes