favor return over return _ (void return); newline/closing terminates
This commit is contained in:
+2
-2
@@ -89,9 +89,9 @@ fields. `_` is not a keyword member name.
|
||||
- boolean `if` / `else if` / `else`, braceless single-statement branches, and optional parenthesized conditions
|
||||
- `while` loops with optional post-iteration update clauses
|
||||
- `for` loops over ranges, arrays, slices, and pointers-to-arrays with copy captures, pointer captures `|@item|`, and optional `usize` index captures
|
||||
- `break`, `continue`, labeled `break :label`, labeled `continue :label`, and labeled plain blocks
|
||||
- `break`, `continue`, labeled `break :label`, labeled `continue :label`, and labeled plain blocks; `break :label` can cross nested scopes to exit a labeled block
|
||||
- bare block scopes, `defer`, and fallible-function `errdefer` with optional error capture; cleanup is block-scoped and LIFO
|
||||
- value blocks, value `if`, value loops, value `match`, `yield`, and labeled `yield :label value`
|
||||
- bare void `return`, same-line `return value`, value blocks, value `if`, value loops, value `match`, and strictly value-producing `yield value` / `yield :label value`
|
||||
- `match` statements/expressions over enums, tagged unions, and scalars, including exhaustiveness checks, payload captures, pointer payload captures, multi-pattern arms, and scalar range patterns
|
||||
- fallible `try`, fallback `catch`, and `catch |e| { ... }` handler blocks
|
||||
- direct `return match ...` and `yield match ...` value-control-flow operands
|
||||
|
||||
Reference in New Issue
Block a user