rust-lang/rust-clippy

Lint `unsigned - other_unsigned > 0`

Open

#588 ouverte le 29 janv. 2016

Voir sur GitHub
 (5 commentaires) (0 réactions) (0 assignés)Rust (1 391 forks)batch import
A-lintL-correctnessS-needs-discussionT-middlegood first issue

Métriques du dépôt

Stars
 (10 406 stars)
Métriques de merge PR
 (Merge moyen 19j 22h) (113 PRs mergées en 30 j)

Description

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.

Guide contributeur