Add implementation of new Instance type so that I2c works (#157) #356
clippy
7 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 7 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.85.1 (4eb161250 2025-03-15)
- cargo 1.85.1 (d73d2caf9 2024-12-31)
- clippy 0.1.85 (4eb161250e 2025-03-15)
Annotations
Check warning on line 326 in src/spi.rs
github-actions / clippy
casting to the same type is unnecessary (`u8` -> `u8`)
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> src/spi.rs:326:23
|
326 | return Ok(self.spi.dr8().read().bits() as u8);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.spi.dr8().read().bits()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 406 in src/rtc.rs
github-actions / clippy
operator precedence can trip the unwary
warning: operator precedence can trip the unwary
--> src/rtc.rs:406:17
|
406 | let value = snd | fst << 4;
| ^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `snd | (fst << 4)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
Check warning on line 74 in src/i2c/config.rs
github-actions / clippy
operator precedence can trip the unwary
warning: operator precedence can trip the unwary
--> src/i2c/config.rs:74:9
|
74 | psc << 28 | scldel << 20 | sdadel << 16 | sclh << 8 | scll
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(psc << 28) | (scldel << 20)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
Check warning on line 74 in src/i2c/config.rs
github-actions / clippy
operator precedence can trip the unwary
warning: operator precedence can trip the unwary
--> src/i2c/config.rs:74:9
|
74 | psc << 28 | scldel << 20 | sdadel << 16 | sclh << 8 | scll
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `psc << 28 | scldel << 20 | (sdadel << 16)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
Check warning on line 74 in src/i2c/config.rs
github-actions / clippy
operator precedence can trip the unwary
warning: operator precedence can trip the unwary
--> src/i2c/config.rs:74:9
|
74 | psc << 28 | scldel << 20 | sdadel << 16 | sclh << 8 | scll
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `psc << 28 | scldel << 20 | sdadel << 16 | (sclh << 8)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
Check warning on line 130 in src/exti.rs
github-actions / clippy
operator precedence can trip the unwary
warning: operator precedence can trip the unwary
--> src/exti.rs:130:48
|
130 | .modify(|r, w| unsafe { w.bits(r.bits() | 1 << (line - 32)) }),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `r.bits() | (1 << (line - 32))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
Check warning on line 127 in src/exti.rs
github-actions / clippy
operator precedence can trip the unwary
warning: operator precedence can trip the unwary
--> src/exti.rs:127:48
|
127 | .modify(|r, w| unsafe { w.bits(r.bits() | 1 << line) }),
| ^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `r.bits() | (1 << line)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
= note: `#[warn(clippy::precedence)]` on by default