-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
S-needs-discussionStatus: Needs further discussion before merging or work can be startedStatus: Needs further discussion before merging or work can be startedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
Currently, the let_and_return lint is always triggered. I have quite a lot of code which looks like:
let something = match something_else {
Variant1 => { /* something */},
...
Variant_some_very_large_number => { /* whatever */ }
};
somethingHere, I believe it is a lot clearer to explicitly have the let binding, since you may have to scroll quite far to see that there's no semi-colon at the end of the match block for it to be obvious that it's the return expression. I don't know what a suitable size threshold would be, or even if it's possible to reasonably make restrictions based on that.
Of course, I'm open to other ways of writing code blocks like this which would also solve the issue!
tobz1000, nicoburns, tv42 and wlinna
Metadata
Metadata
Assignees
Labels
S-needs-discussionStatus: Needs further discussion before merging or work can be startedStatus: Needs further discussion before merging or work can be startedgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy