rust-lang/rust-clippy

Lint `unsigned - other_unsigned > 0`

Open

#588 geöffnet am 29. Jan. 2016

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.391 Forks)batch import
A-lintL-correctnessS-needs-discussionT-middlegood first issue

Repository-Metriken

Stars
 (10.406 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide