<int>.signum()
can be safely cast to any signed integer
#5395
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
clippy version: clippy 0.0.212 (4ee1206 2020-02-01)
<int>.signum()
always returns -1, 0, or 1. As such, it can safely be cast to any signed integer.The following currently triggers
clippy::cast_possible_truncation
, but there's no reason it needs to.Related: #4605, #4818
The text was updated successfully, but these errors were encountered: