Use thiserror for errors #183
Annotations
25 warnings
the method `read_channel` doesn't need a mutable reference:
examples/adc.rs#L36
warning: the method `read_channel` doesn't need a mutable reference
--> examples/adc.rs:36:42
|
36 | let data: u16 = adc.read_channel(&mut ch0);
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
= note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
|
call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes:
src/time.rs#L247
warning: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
--> src/time.rs:247:9
|
247 | drop(dwt);
| ^^^^^^^^^
|
note: argument has type `cortex_m::peripheral::DWT`
--> src/time.rs:247:14
|
247 | drop(dwt);
| ^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_non_drop
= note: `#[warn(clippy::drop_non_drop)]` on by default
|
clamp-like pattern without using clamp function:
src/rcu.rs#L273
warning: clamp-like pattern without using clamp function
--> src/rcu.rs:273:26
|
273 | let pllmul = cmp::min(cmp::max(pllmul, 2), 32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `pllmul.clamp(2, 32)`
|
= note: clamp will panic if max < min
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp
= note: `#[warn(clippy::manual_clamp)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L171
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:171:18
|
171 | unsafe { &(*RCU::ptr()).addrst() }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).addrst()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L165
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:165:18
|
165 | unsafe { &(*RCU::ptr()).adden() }
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).adden()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L144
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:144:18
|
144 | unsafe { &(*RCU::ptr()).apb2rst() }
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).apb2rst()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L139
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:139:18
|
139 | unsafe { &(*RCU::ptr()).apb2en() }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).apb2en()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L114
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:114:18
|
114 | unsafe { &(*RCU::ptr()).apb1rst() }
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).apb1rst()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L109
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:109:18
|
109 | unsafe { &(*RCU::ptr()).apb1en() }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).apb1en()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/rcu.rs#L89
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/rcu.rs:89:18
|
89 | unsafe { &(*RCU::ptr()).ahben() }
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*RCU::ptr()).ahben()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice`:
src/i2c.rs#L668
warning: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `slice`
--> src/i2c.rs:668:42
|
668 | for (i, operation) in operations.into_iter().enumerate() {
| ^^^^^^^^^ help: call directly: `iter_mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L457
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:457:18
|
457 | unsafe { &(*Fmc::ptr()).wp() }
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).wp()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L444
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:444:18
|
444 | unsafe { &(*Fmc::ptr()).stat() }
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).stat()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L432
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:432:18
|
432 | unsafe { &(*Fmc::ptr()).obkey() }
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).obkey()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L419
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:419:18
|
419 | unsafe { &(*Fmc::ptr()).obstat() }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).obstat()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L406
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:406:18
|
406 | unsafe { &(*Fmc::ptr()).key() }
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).key()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L394
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:394:18
|
394 | unsafe { &(*Fmc::ptr()).ctl() }
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).ctl()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L382
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:382:18
|
382 | unsafe { &(*Fmc::ptr()).addr() }
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).addr()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/flash.rs#L370
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/flash.rs:370:18
|
370 | unsafe { &(*Fmc::ptr()).ws() }
| ^^^^^^^^^^^^^^^^^^^ help: change this to: `(*Fmc::ptr()).ws()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
clippy_check
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|
clippy_check
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/
|