Skip to content

Add support for UART4/5 #117

Add support for UART4/5

Add support for UART4/5 #117

GitHub Actions / clippy succeeded Mar 30, 2025 in 0s

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 44 in src/rtc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
  --> src/rtc.rs:28:1
   |
28 | / /**
29 | |   Real time clock
30 | |
31 | |   A continuously running clock that counts seconds¹. It is part of the backup domain which means
...  |
43 | | */
44 | |
   | |_^
45 |   pub struct Rtc<CS = RtcClkLse> {
   |   ------------------------------ the comment documents this struct
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
   = help: if the empty line is unintentional remove it

Check warning on line 190 in src/rcc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
   --> src/rcc.rs:189:5
    |
189 | /     /// ```
190 | |
    | |_^
191 |       #[inline(always)]
192 |       pub fn freeze(self, acr: &mut ACR) -> Clocks {
    |       -------------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = help: if the empty line is unintentional remove it

Check warning on line 522 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

warning: empty line after doc comment
   --> src/gpio.rs:516:5
    |
516 | /     /**
517 | |       Set the output of the pin regardless of its mode.
518 | |       Primarily used to set the output value of the pin
519 | |       before changing its mode to an output to avoid
520 | |       a short spike of an incorrect value
521 | |     */
522 | |
    | |_^
523 |       #[inline(always)]
524 |       fn _set_state(&mut self, state: PinState) {
    |       ----------------------------------------- the comment documents this method
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
    = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
    = help: if the empty line is unintentional remove it

Check warning on line 66 in src/flash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> src/flash.rs:66:6
   |
66 | impl<'a> FlashWriter<'a> {
   |      ^^              ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
66 - impl<'a> FlashWriter<'a> {
66 + impl FlashWriter<'_> {
   |

Check warning on line 363 in src/rtc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

operator precedence can trip the unwary

warning: operator precedence can trip the unwary
   --> src/rtc.rs:363:9
    |
363 |         self.regs.cnth().read().bits() << 16 | self.regs.cntl().read().bits()
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self.regs.cnth().read().bits() << 16) | self.regs.cntl().read().bits()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence

Check warning on line 285 in src/i2c.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

operator precedence can trip the unwary

warning: operator precedence can trip the unwary
   --> src/i2c.rs:285:35
    |
285 |             .write(|w| w.dr().set(addr << 1 | (u8::from(read))));
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(addr << 1) | (u8::from(read))`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence

Check warning on line 248 in src/flash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

operator precedence can trip the unwary

warning: operator precedence can trip the unwary
   --> src/flash.rs:248:30
    |
248 |             let hword: u16 = (data[idx] as u16) | (data[idx + 1] as u16) << 8;
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(data[idx] as u16) | ((data[idx + 1] as u16) << 8)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
    = note: `#[warn(clippy::precedence)]` on by default