Patch SVDs with GPIO5 clock gate #231
clippy
15 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 15 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 26 in raltool/src/transform/rename.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> raltool/src/transform/rename.rs:26:48
|
26 | super::map_device_peripheral_names(ir, &renamer);
| ^^^^^^^^ help: change this to: `renamer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 25 in raltool/src/transform/rename.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> raltool/src/transform/rename.rs:25:35
|
25 | super::map_enum_names(ir, &renamer);
| ^^^^^^^^ help: change this to: `renamer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 24 in raltool/src/transform/rename.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> raltool/src/transform/rename.rs:24:39
|
24 | super::map_fieldset_names(ir, &renamer);
| ^^^^^^^^ help: change this to: `renamer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 23 in raltool/src/transform/rename.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> raltool/src/transform/rename.rs:23:36
|
23 | super::map_block_names(ir, &renamer);
| ^^^^^^^^ help: change this to: `renamer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 22 in raltool/src/transform/rename.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> raltool/src/transform/rename.rs:22:37
|
22 | super::map_device_names(ir, &renamer);
| ^^^^^^^^ help: change this to: `renamer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 45 in raltool/src/transform/merge_fieldsets.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> raltool/src/transform/merge_fieldsets.rs:45:21
|
45 | main_id = id.clone();
| ^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `main_id.clone_from(id)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 45 in raltool/src/transform/merge_blocks.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> raltool/src/transform/merge_blocks.rs:45:21
|
45 | main_id = id.clone();
| ^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `main_id.clone_from(id)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 236 in raltool/src/transform/common.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> raltool/src/transform/common.rs:236:21
|
236 | bi.block = to.clone()
| ^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `bi.block.clone_from(&to)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 226 in raltool/src/transform/common.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> raltool/src/transform/common.rs:226:21
|
226 | *block = to.clone()
| ^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `block.clone_from(&to)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 200 in raltool/src/transform/common.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> raltool/src/transform/common.rs:200:21
|
200 | *id = to.clone()
| ^^^^^^^^^^^^^^^^ help: use `clone_from()`: `id.clone_from(&to)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 307 in raltool/src/svd2ir.rs
github-actions / clippy
you seem to use `.enumerate()` and immediately discard the index
warning: you seem to use `.enumerate()` and immediately discard the index
--> raltool/src/svd2ir.rs:307:25
|
307 | for (_n, &i) in irqs.iter().enumerate() {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
= note: `#[warn(clippy::unused_enumerate_index)]` on by default
help: remove the `.enumerate()` call
|
307 | for &i in irqs.iter() {
| ~~ ~~~~~~~~~~~
Check warning on line 49 in raltool/src/generate/fieldset.rs
github-actions / clippy
use of `unwrap_or_else` to construct default value
warning: use of `unwrap_or_else` to construct default value
--> raltool/src/generate/fieldset.rs:49:18
|
49 | .unwrap_or_else(TokenStream::new)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
Check warning on line 75 in raltool/src/generate/device.rs
github-actions / clippy
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> raltool/src/generate/device.rs:75:37
|
75 | let address = util::hex(peripheral.base_address as u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `peripheral.base_address`
|
= 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 424 in raltool/src/combine.rs
github-actions / clippy
non-canonical implementation of `clone` on a `Copy` type
warning: non-canonical implementation of `clone` on a `Copy` type
--> raltool/src/combine.rs:422:29
|
422 | fn clone(&self) -> Self {
| _____________________________^
423 | | Self(self.0)
424 | | }
| |_____^ help: change this to: `{ *self }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_clone_impl
= note: `#[warn(clippy::non_canonical_clone_impl)]` on by default
Check warning on line 352 in raltool/src/combine.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> raltool/src/combine.rs:352:36
|
352 | .map(|path| Regex::new(&path).unwrap())
| ^^^^^ help: change this to: `path`
|
= 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