rust-lang/rust-clippy

Lint `unsigned - other_unsigned > 0`

Open

#588 aberto em 29 de jan. de 2016

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Rust (1.391 forks)batch import
A-lintL-correctnessS-needs-discussionT-middlegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)

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.

Guia do colaborador