Skip to content

Merge pull request #172 from JanekGraff/flash #221

Merge pull request #172 from JanekGraff/flash

Merge pull request #172 from JanekGraff/flash #221

GitHub Actions / clippy succeeded Dec 12, 2023 in 0s

clippy

9 warnings

Details

Results

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

Versions

  • rustc 1.74.1 (a28077b28 2023-12-04)
  • cargo 1.74.1 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (a28077b 2023-12-04)

Annotations

Check warning on line 75 in src/can.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unsafe function's docs miss `# Safety` section

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

Check warning on line 265 in src/tsc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constructor `tsc` has the same name as the type

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

Check warning on line 576 in src/rcc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`

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 +             }
    |

Check warning on line 411 in src/adc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `default` to create a unit struct

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

Check warning on line 319 in src/adc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `default` to create a unit struct

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

Check warning on line 250 in src/adc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `default` to create a unit struct

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

Check warning on line 175 in src/adc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `default` can be confused for the standard trait method `std::default::Default::default`

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

Check warning on line 145 in src/adc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `default` can be confused for the standard trait method `std::default::Default::default`

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

Check warning on line 100 in src/adc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `default` can be confused for the standard trait method `std::default::Default::default`

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