rust-lang/rust-clippy

Lint `unsigned - other_unsigned > 0`

Open

#588 aperta il 29 gen 2016

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Rust (1391 fork)batch import
A-lintL-correctnessS-needs-discussionT-middlegood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 19g 22h) (113 PR mergiate in 30 g)

Descrizione

Idea from here. Basically, x - y, where x and y are of some unsigned integer type, returns 0 iff x == y, so comparing the difference to 0 is dodgy and should at least be rewritten for clarity.

Guida contributor