Skip to content

Commit 7637254

Browse files
authored
small typo in a proposal 0345 (#2455)
1 parent 576155e commit 7637254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proposals/0345-if-let-shorthand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ This is different from Swift's optional binding conditions (`if let foo = foo`),
359359

360360
### Don't permit `if var foo`
361361

362-
Since `if var foo = foo` is significantly less common that `if let foo = foo`, we could potentially choose to _not_ support `var` in this shorthand syntax.
362+
Since `if var foo = foo` is significantly less common than `if let foo = foo`, we could potentially choose to _not_ support `var` in this shorthand syntax.
363363

364364
`var` shadowing has the potential to be more confusing than `let` shadowing -- `var` introduces a new _mutable_ variable, and any mutations to the new variable are not shared with the original optional variable. On the other hand, `if var foo = foo` already exists, and it seems unlikely that `if var foo` would be more confusing / less clear than the existing syntax.
365365

0 commit comments

Comments
 (0)