4 ms·
This sounds horrid.
by nsajko 5y ago
This sounds horrid.
- bitcharmer 5y agoWhy?
- scoutt 5y agoNot OP, but what happens in the case you want to add by subtracting a negative value?
- gpm 5y agoYou disable the warning for the function?
- dureuill 5y agoYes, which also serves as a way to explicitly point out that the "surprising operation" is intended. Hopefully this even reminds you of putting an explanatory comment there.
- doteka 5y agoKnowing clippy I wouldn’t be surprised if that compiled, but resulted in a warning that you can simplify the double negative.
- vurpo 5y agoClippy is a linter. You don't use linters by mechanically following its warnings as gospel, you use it by double-checking the code wherever it warns and removing the warning from that function if it's a false positive.
- gameswithgo 5y agoclippy is an optional linting tool, don't have to use it, and if you do use it you can configure it to not care about this