rust-lang/rust-clippy

Lint `unsigned - other_unsigned > 0`

Open

#588 opened on 2016年1月29日

GitHub で見る
 (5 comments) (0 reactions) (0 assignees)Rust (1,391 forks)batch import
A-lintL-correctnessS-needs-discussionT-middlegood first issue

Repository metrics

Stars
 (10,406 stars)
PR merge metrics
 (平均マージ 19d 22h) (30d で 113 merged PRs)

説明

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.

コントリビューターガイド