We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
clippy::manual_range_contains
1 parent e83698e commit 52660a6Copy full SHA for 52660a6
src/r3_support_rza1/src/gpio.rs
@@ -40,7 +40,7 @@ unsafe fn clear_bit16(reg: *mut u16, bit: u8) {
40
41
#[inline]
42
fn panic_if_pin_is_invalid((n, m): Pin) {
43
- assert!(n >= 1 && n < 12, "1 <= {n} < 12");
+ assert!((1..12).contains(&n), "1 <= {n} < 12");
44
assert!(m < 16, "0 <= {m} < 16");
45
}
46
0 commit comments