clippy
7 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 7 |
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 295 in pallets/pass/src/lib.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> pallets/pass/src/lib.rs:295:57
|
295 | let (account_id, until) = Sessions::<T, I>::get(&who)?;
| ^^^^ help: change this to: `who`
|
= 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 83 in pallets/pass/src/lib.rs
github-actions / clippy
using `map_err` over `inspect_err`
warning: using `map_err` over `inspect_err`
--> pallets/pass/src/lib.rs:83:15
|
83 | #[pallet::pallet]
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
83 - #[pallet::pallet]
83 + #[pallet::&inspect_err]
|
Check warning on line 157 in pallets/pass/src/lib.rs
github-actions / clippy
matching on `Some` with `ok()` is redundant
warning: matching on `Some` with `ok()` is redundant
--> pallets/pass/src/lib.rs:157:17
|
157 | if let Some(account_id) = Pallet::<T, I>::account_id_for(credential.user_id()).ok() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok
= note: `#[warn(clippy::match_result_ok)]` on by default
help: consider matching on `Ok(account_id)` and removing the call to `ok` instead
|
157 | if let Ok(account_id) = Pallet::<T, I>::account_id_for(credential.user_id()) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 88 in pallets/pass/src/extension.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
--> pallets/pass/src/extension.rs:88:59
|
88 | let who = Pallet::<T, I>::signer_from_session_key(&who).unwrap_or(who.clone());
| ^^^^ help: change this to: `who`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 77 in pallets/pass/src/extension.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
--> pallets/pass/src/extension.rs:77:59
|
77 | let who = Pallet::<T, I>::signer_from_session_key(&who).unwrap_or(who.clone());
| ^^^^ help: change this to: `who`
|
= 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
Check warning on line 93 in pallets/referenda-tracks/src/lib.rs
github-actions / clippy
using `map_err` over `inspect_err`
warning: using `map_err` over `inspect_err`
--> pallets/referenda-tracks/src/lib.rs:93:15
|
93 | #[pallet::pallet]
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
93 - #[pallet::pallet]
93 + #[pallet::&inspect_err]
|
Check warning on line 34 in pallets/template/src/lib.rs
github-actions / clippy
using `map_err` over `inspect_err`
warning: using `map_err` over `inspect_err`
--> pallets/template/src/lib.rs:34:15
|
34 | #[pallet::pallet]
| ^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
34 - #[pallet::pallet]
34 + #[pallet::&inspect_err]
|