Normalize semicolon inside/outside blocks for ()
returning expressions
#7322
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-pedantic
Lint: Belongs in the pedantic lint group
What it does
For
()
returning expressions, check that the semicolon is inside/outside the block.Either way it is fine, but consistency is best. Having the semicolon inside may be slightly nicer and more similar to, say, conditionals and loop bodies.
Categories (optional)
clippy::style
Drawbacks
It is subjective, so perhaps we should offer both ways, one enabled by default.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: