Skip to content

Updates to dependencies / serial port updates (#214) #345

Updates to dependencies / serial port updates (#214)

Updates to dependencies / serial port updates (#214) #345

GitHub Actions / clippy succeeded Aug 2, 2024 in 1s

clippy

61 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 61
Note 0
Help 0

Versions

  • rustc 1.80.0 (051478957 2024-07-21)
  • cargo 1.80.0 (376290515 2024-07-16)
  • clippy 0.1.80 (0514789 2024-07-21)

Annotations

Check warning on line 174 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:174:23
    |
174 |                 .bits(total_height as u16)
    |                       ^^^^^^^^^^^^^^^^^^^ help: try: `total_height`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 172 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:172:23
    |
172 |                 .bits(total_width as u16)
    |                       ^^^^^^^^^^^^^^^^^^ help: try: `total_width`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 168 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:168:23
    |
168 |                 .bits((config.v_sync + config.v_back_porch + config.active_height - 1) as u16)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(config.v_sync + config.v_back_porch + config.active_height - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 166 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:166:23
    |
166 |                 .bits((config.h_sync + config.h_back_porch + config.active_width - 1) as u16)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(config.h_sync + config.h_back_porch + config.active_width - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 162 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:162:23
    |
162 |                 .bits((config.v_sync + config.v_back_porch - 1) as u16)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(config.v_sync + config.v_back_porch - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 160 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:160:23
    |
160 |                 .bits((config.h_sync + config.h_back_porch - 1) as u16)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(config.h_sync + config.h_back_porch - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 156 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:156:23
    |
156 |                 .bits((config.v_sync - 1) as u16)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(config.v_sync - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 154 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
   --> src/ltdc.rs:154:23
    |
154 |                 .bits((config.h_sync - 1) as u16)
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(config.h_sync - 1)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 86 in src/ltdc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded late initialization

warning: unneeded late initialization
  --> src/ltdc.rs:86:9
   |
86 |         let base_clk: u32;
   |         ^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
   = note: `#[warn(clippy::needless_late_init)]` on by default
help: move the declaration `base_clk` here and remove the assignments from the `match` arms
   |
86 ~         
87 ~         let base_clk: u32 = match &hse {
88 ~             Some(hse) => hse.freq.raw(),
89 |             // If no HSE is provided, we use the HSI clock at 16 MHz
90 ~             None => 16_000_000,
91 ~         };
   |

Check warning on line 317 in src/i2c.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u8` -> `u8`)

warning: casting to the same type is unnecessary (`u8` -> `u8`)
   --> src/i2c.rs:317:25
    |
317 |                 presc = tmp_presc as u8;
    |                         ^^^^^^^^^^^^^^^ help: try: `tmp_presc`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 94 in src/timer/pwm_input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
   --> src/timer/pwm_input.rs:94:17
    |
94  |               /// See the pwm input example for an suitable interrupt handler.
    |                   ^
...
268 | / hal! {
269 | |     TIM1,
270 | |     TIM5,
271 | |     TIM9,
272 | | }
    | |_- in this macro invocation
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
    = note: this warning originates in the macro `hal` (in Nightly builds, run with -Z macro-backtrace for more info)
help: indent this line
    |
94  |             ///    See the pwm input example for an suitable interrupt handler.
    |                 +++

Check warning on line 15 in src/timer/pwm_input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
  --> src/timer/pwm_input.rs:15:5
   |
15 | /// An example interrupt handler is provided:
   |     ^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
   |
15 | ///    An example interrupt handler is provided:
   |     +++

Check warning on line 869 in src/rcc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u32` -> `u32`)

warning: casting to the same type is unnecessary (`u32` -> `u32`)
   --> src/rcc.rs:869:65
    |
869 |             let one_over_m = ((1 << Self::FIXED_POINT_LSHIFT) / (m as u32) + 1) >> 1;
    |                                                                 ^^^^^^^^^^ help: try: `m`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 669 in src/rcc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`)
   --> src/rcc.rs:669:36
    |
669 | ...                   (((base_clk as u64 * self.pllsain as u64 * one_over_m as u64)
    |                          ^^^^^^^^^^^^^^^ help: try: `base_clk`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 645 in src/rcc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`)
   --> src/rcc.rs:645:43
    |
645 |                         let pll48clk = (((base_clk as u64 * self.plln as u64 * one_over_m as u64)
    |                                           ^^^^^^^^^^^^^^^ help: try: `base_clk`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 629 in src/rcc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u64` -> `u64`)

warning: casting to the same type is unnecessary (`u64` -> `u64`)
   --> src/rcc.rs:629:25
    |
629 |             sysclk = (((base_clk as u64 * self.plln as u64 * one_over_m as u64)
    |                         ^^^^^^^^^^^^^^^ help: try: `base_clk`
    |
    = 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 37 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
  --> src/gpio.rs:37:5
   |
37 | //!     mode. Can be used as an input in the `open` configuration
   |     ^^^^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
   |
37 | //!       mode. Can be used as an input in the `open` configuration
   |         ++

Check warning on line 32 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
  --> src/gpio.rs:32:5
   |
32 | //!     is connected
   |     ^^^^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
   |
32 | //!       is connected
   |         ++

Check warning on line 30 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item missing indentation

warning: doc list item missing indentation
  --> src/gpio.rs:30:5
   |
30 | //!     is connected
   |     ^^^^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
   = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
   |
30 | //!       is connected
   |         ++

Check warning on line 649 in src/dma.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
   --> src/dma.rs:640:1
    |
640 | / impl Default for Interrupts {
641 | |     fn default() -> Self {
642 | |         Self {
643 | |             transfer_complete: false,
...   |
648 | |     }
649 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
    = note: `#[warn(clippy::derivable_impls)]` on by default
    = help: remove the manual implementation...
help: ...and instead derive it
    |
633 + #[derive(Default)]
634 | pub struct Interrupts {
    |

Check warning on line 588 in src/dma.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'r

warning: the following explicit lifetimes could be elided: 'r
   --> src/dma.rs:588:27
    |
588 |                   fn select<'r>(w: &'r mut dma2::st::cr::W)
    |                             ^^      ^^
589 |                       -> &'r mut dma2::st::cr::W
    |                           ^^
...
600 | / impl_channel!(
601 | |     Channel0, 0;
602 | |     Channel1, 1;
603 | |     Channel2, 2;
...   |
608 | |     Channel7, 7;
609 | | );
    | |_- in this macro invocation
    |
    = 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
    = note: this warning originates in the macro `impl_channel` (in Nightly builds, run with -Z macro-backtrace for more info)
help: elide the lifetimes
    |
588 ~                 fn select(w: &mut dma2::st::cr::W)
589 ~                     -> &mut dma2::st::cr::W
    |

Check warning on line 119 in src/dma.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric method

warning: usage of a legacy numeric method
   --> src/dma.rs:119:38
    |
119 |         assert!(buffer.len() <= u16::max_value() as usize);
    |                                      ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
    |
119 |         assert!(buffer.len() <= u16::MAX as usize);
    |                                      ~~~

Check warning on line 535 in src/timer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary `unsafe` block

warning: unnecessary `unsafe` block
   --> src/timer.rs:535:31
    |
535 |                   ccr.write(|w| unsafe { w.bits(value) })
    |                                 ^^^^^^ unnecessary `unsafe` block
...
729 | / hal! {
730 | |     pac::TIM2: [Timer2, u32, c: (CH4), m: tim2,],
731 | |     pac::TIM3: [Timer3, u16, c: (CH4), m: tim3,],
732 | |     pac::TIM4: [Timer4, u16, c: (CH4), m: tim3,],
...   |
744 | |     pac::TIM11: [Timer11, u16, c: (CH1),],
745 | | }
    | |_- in this macro invocation
    |
    = note: this warning originates in the macro `with_pwm` which comes from the expansion of the macro `hal` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 535 in src/timer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary `unsafe` block

warning: unnecessary `unsafe` block
   --> src/timer.rs:535:31
    |
535 |                   ccr.write(|w| unsafe { w.bits(value) })
    |                                 ^^^^^^ unnecessary `unsafe` block
...
729 | / hal! {
730 | |     pac::TIM2: [Timer2, u32, c: (CH4), m: tim2,],
731 | |     pac::TIM3: [Timer3, u16, c: (CH4), m: tim3,],
732 | |     pac::TIM4: [Timer4, u16, c: (CH4), m: tim3,],
...   |
744 | |     pac::TIM11: [Timer11, u16, c: (CH1),],
745 | | }
    | |_- in this macro invocation
    |
    = note: `#[warn(unused_unsafe)]` on by default
    = note: this warning originates in the macro `with_pwm` which comes from the expansion of the macro `hal` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 267 in src/timer/pwm_input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `stm32f410`

warning: unexpected `cfg` condition value: `stm32f410`
   --> src/timer/pwm_input.rs:267:11
    |
267 | #[cfg(not(feature = "stm32f410"))]
    |           ^^^^^^^^^^-----------
    |                     |
    |                     help: there is a expected value with a similar name: `"stm32f730"`
    |
    = note: expected values for `feature` are: `device-selected`, `display-interface`, `fmc`, `fmc_lcd`, `gpioj`, `gpiok`, `has-can`, `ltdc`, `rt`, `rtic`, `rtic-monotonic`, `stm32-fmc`, `stm32f722`, `stm32f723`, `stm32f730`, `stm32f730-lpc`, `stm32f732`, `stm32f733`, `stm32f745`, `stm32f746`, `stm32f756`, `stm32f765`, `stm32f767`, `stm32f769`, `stm32f777`, `stm32f778`, `stm32f779`, `svd-f730`, `svd-f745`, `svd-f765`, `svd-f7x2`, `svd-f7x3`, `svd-f7x6`, `svd-f7x7`, and `svd-f7x9` and 4 more
    = help: consider adding `stm32f410` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration