rust-lang/rust-clippy

Lint `unsigned - other_unsigned > 0`

Open

#588 建立於 2016年1月29日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Rust (1,391 fork)batch import
A-lintL-correctnessS-needs-discussionT-middlegood first issue

倉庫指標

Star
 (10,406 star)
PR 合併指標
 (平均合併 19天 22小時) (30 天內合併 113 個 PR)

描述

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.

貢獻者指南