Fix for needless_return
replaces no-value returns with blank lines
#9416
Labels
L-suggestion
Lint: Improving, adding or fixing lint suggestions
Description
When fixing
needless_return
, if thereturn
statement has no value, clippy will fix it by replacing it with a blank line. Specifically, the blank line is a series of spaces whose ending matches the start of .I guess clippy is not considering such case, so it prepares the leading space for the value, but then it doesn't add anything, since there isn't any value to add.
Example diff (it's not visible; select the text with the mouse in order to visualize it):
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: