bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Enable warning for the `clippy::question_mark` lint

Open Kanabenki opened this issue 2 years ago • 3 comments

Objective

  • Enable the warn level for the clippy::question_mark lint. It seems rather uncontroversial and general good practice to me.

Solution

  • Enable the lint.
  • Use the question mark/ok adapter to simplify some Option/Result returns. I can revert that and keep only the changes highlighted by the lint if preferable.
  • Fix some trailing whitespace.

Kanabenki avatar Feb 04 '24 19:02 Kanabenki

There are two other question mark related lints that could be added alongside this one, which currently do not trigger anywhere in the codebase (unless we want to go with always one lint per PR):

Kanabenki avatar Mar 04 '24 16:03 Kanabenki

One lint per PR is nice: it lets us evaluate the impact and discuss them seperately.

alice-i-cecile avatar Mar 04 '24 17:03 alice-i-cecile

@mockersf do you still want to mark this PR as controversial?

alice-i-cecile avatar Apr 24 '24 18:04 alice-i-cecile