Skip to content

Merge pull request #416 from stm32-rs/ehal #673

Merge pull request #416 from stm32-rs/ehal

Merge pull request #416 from stm32-rs/ehal #673

GitHub Actions / clippy succeeded Oct 5, 2024 in 0s

clippy

11 warnings

Details

Results

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

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/timer/pwm_input.rs:165:45
    |
165 |     let presc = clock / freq.saturating_mul(core::u16::MAX as u32 + 1);
    |                                             ^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
165 |     let presc = clock / freq.saturating_mul(u16::MAX as u32 + 1);
    |                                             ~~~~~~~~

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

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/timer/pwm_input.rs:163:33
    |
163 |         return (core::u16::MAX, core::u16::MAX);
    |                                 ^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
163 |         return (core::u16::MAX, u16::MAX);
    |                                 ~~~~~~~~

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

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> src/timer/pwm_input.rs:163:17
    |
163 |         return (core::u16::MAX, core::u16::MAX);
    |                 ^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
163 |         return (u16::MAX, core::u16::MAX);
    |                 ~~~~~~~~

Check warning on line 7 in src/qei.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> src/qei.rs:7:5
  |
7 | use core::u16;
  |     ^^^^^^^^^
  |
  = help: remove this import
  = note: then `u16::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

Check warning on line 38 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item without indentation

warning: doc list item without indentation
  --> src/gpio.rs:38:5
   |
38 | //! used if the [JTAG peripheral has been turned off](#accessing-pa15-pb3-and-pb14).
   |     ^
   |
   = 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
   |
38 | //!   used if the [JTAG peripheral has been turned off](#accessing-pa15-pb3-and-pb14).
   |     ++

Check warning on line 36 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item without indentation

warning: doc list item without indentation
  --> src/gpio.rs:36:5
   |
36 | //!     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
   |
36 | //!       mode. Can be used as an input in the `open` configuration
   |         ++

Check warning on line 31 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item without indentation

warning: doc list item without indentation
  --> src/gpio.rs:31:5
   |
31 | //!     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
   |
31 | //!       is connected
   |         ++

Check warning on line 29 in src/gpio.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

doc list item without indentation

warning: doc list item without indentation
  --> src/gpio.rs:29:5
   |
29 | //!     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
   |
29 | //!       is connected
   |         ++

Check warning on line 249 in src/adc.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/adc.rs:249:45
    |
249 |                           Align::Left => u16::max_value(),
    |                                               ^^^^^^^^^^^
...
545 | / adc_hal! {
546 | |     pac::ADC2: (adc2),
547 | | }
    | |_- in this macro invocation
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    = note: this warning originates in the macro `adc_hal` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use the associated constant instead
    |
249 |                         Align::Left => u16::MAX,
    |                                             ~~~

Check warning on line 249 in src/adc.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/adc.rs:249:45
    |
249 |                           Align::Left => u16::max_value(),
    |                                               ^^^^^^^^^^^
...
540 | / adc_hal! {
541 | |     pac::ADC1: (adc1),
542 | | }
    | |_- in this macro invocation
    |
    = 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
    = note: this warning originates in the macro `adc_hal` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use the associated constant instead
    |
249 |                         Align::Left => u16::MAX,
    |                                             ~~~

Check warning on line 187 in src/rcc/enable.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `stm32f102`

warning: unexpected `cfg` condition value: `stm32f102`
   --> src/rcc/enable.rs:187:11
    |
187 | #[cfg(any(feature = "stm32f102", feature = "stm32f103"))]
    |           ^^^^^^^^^^-----------
    |                     |
    |                     help: there is a expected value with a similar name: `"stm32f103"`
    |
    = note: expected values for `feature` are: `connectivity`, `device-selected`, `doc`, `has-can`, `has-dac`, `high`, `medium`, `rt`, `rtic`, `rtic-monotonic`, `stm32-usbd`, `stm32f100`, `stm32f101`, `stm32f103`, `stm32f105`, `stm32f107`, and `xl`
    = help: consider adding `stm32f102` 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
    = note: `#[warn(unexpected_cfgs)]` on by default