Merge pull request #172 from JanekGraff/flash #221
Annotations
14 warnings
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
unsafe function's docs miss `# Safety` section:
src/can.rs#L75
warning: unsafe function's docs miss `# Safety` section
--> src/can.rs:75:5
|
75 | pub unsafe fn peripheral(&mut self) -> &mut CAN {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `#[warn(clippy::missing_safety_doc)]` on by default
|
constructor `tsc` has the same name as the type:
src/tsc.rs#L223
warning: constructor `tsc` has the same name as the type
--> src/tsc.rs:223:5
|
223 | / pub fn tsc(tsc: TSC, rcc: &mut Rcc, cfg: Option<Config>) -> Self {
224 | | // Enable the peripheral clock
225 | | rcc.regs.ahbenr.modify(|_, w| w.tscen().set_bit());
226 | | rcc.regs.ahbrstr.modify(|_, w| w.tscrst().set_bit());
... |
264 | | Tsc { tsc }
265 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors
= note: `#[warn(clippy::self_named_constructors)]` on by default
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
src/rcc.rs#L565
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/rcc.rs:565:13
|
565 | / match self.crs {
566 | | Some(crs) => {
567 | | self.rcc.apb1enr.modify(|_, w| w.crsen().set_bit());
568 | |
... |
575 | | _ => {}
576 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
565 ~ if let Some(crs) = self.crs {
566 + self.rcc.apb1enr.modify(|_, w| w.crsen().set_bit());
567 +
568 + // Initialize clock recovery
569 + // Set autotrim enabled.
570 + crs.cr.modify(|_, w| w.autotrimen().set_bit());
571 + // Enable CR
572 + crs.cr.modify(|_, w| w.cen().set_bit());
573 + }
|
|
use of `default` to create a unit struct:
src/adc.rs#L411
warning: use of `default` to create a unit struct
--> src/adc.rs:411:13
|
411 | VBat::default()
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
|
use of `default` to create a unit struct:
src/adc.rs#L319
warning: use of `default` to create a unit struct
--> src/adc.rs:319:13
|
319 | VRef::default()
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
|
use of `default` to create a unit struct:
src/adc.rs#L250
warning: use of `default` to create a unit struct
--> src/adc.rs:250:14
|
250 | VTemp::default()
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
|
method `default` can be confused for the standard trait method `std::default::Default::default`:
src/adc.rs#L173
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> src/adc.rs:173:5
|
173 | / pub fn default() -> Self {
174 | | AdcPrecision::B_12
175 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
|
method `default` can be confused for the standard trait method `std::default::Default::default`:
src/adc.rs#L143
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> src/adc.rs:143:5
|
143 | / pub fn default() -> Self {
144 | | AdcAlign::Right
145 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
|
method `default` can be confused for the standard trait method `std::default::Default::default`:
src/adc.rs#L98
warning: method `default` can be confused for the standard trait method `std::default::Default::default`
--> src/adc.rs:98:5
|
98 | / pub fn default() -> Self {
99 | | AdcSampleTime::T_239
100 | | }
| |_____^
|
= help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
= note: `#[warn(clippy::should_implement_trait)]` on by default
|