feat(fc-pallet-pass): add SkipCheckIfPassAccount
#15
lint-pr.yml
on: pull_request_target
Validate PR title for conventional commit compliance
2s
Annotations
2 errors and 4 warnings
mismatched types:
pallets/pass/src/extension.rs#L207
error[E0308]: mismatched types
--> pallets/pass/src/extension.rs:207:30
|
207 | S::post_dispatch(pre, info, post_info, len, result)
| ---------------- ^^^ expected `Option<<S as SignedExtension>::Pre>`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected enum `std::option::Option<<S as sp_runtime::traits::SignedExtension>::Pre>`
found associated type `<S as sp_runtime::traits::SignedExtension>::Pre`
note: associated function defined here
--> /home/runner/.cargo/git/checkouts/polkadot-sdk-9b4d86516933931c/d13cf29/substrate/primitives/runtime/src/traits.rs:1583:5
|
1583 | fn post_dispatch(
| ^^^^^^^^^^^^^
help: consider constraining the associated type `<S as sp_runtime::traits::SignedExtension>::Pre` to `std::option::Option<<S as sp_runtime::traits::SignedExtension>::Pre>`
|
161 | S: SignedExtension<AccountId = T::AccountId, Call = <T as frame_system::Config>::RuntimeCall, Pre = std::option::Option<<S as sp_runtime::traits::SignedExtension>::Pre>>,
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
help: try wrapping the expression in `Some`
|
207 | S::post_dispatch(Some(pre), info, post_info, len, result)
| +++++ +
|
mismatched types:
pallets/pass/src/extension.rs#L194
error[E0308]: mismatched types
--> pallets/pass/src/extension.rs:194:23
|
194 | return Ok((None, Default::default()));
| -- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found `(Option<_>, _)`
| |
| arguments to this enum variant are incorrect
|
= note: expected associated type `<S as sp_runtime::traits::SignedExtension>::Pre`
found tuple `(std::option::Option<_>, _)`
help: the type constructed contains `(std::option::Option<_>, _)` due to the type of the argument passed
--> pallets/pass/src/extension.rs:194:20
|
194 | return Ok((None, Default::default()));
| ^^^--------------------------^
| |
| this argument influences the type of `Ok`
note: tuple variant defined here
--> /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/result.rs:531:5
help: consider constraining the associated type `<S as sp_runtime::traits::SignedExtension>::Pre` to `(std::option::Option<_>, _)`
|
161 | S: SignedExtension<AccountId = T::AccountId, Call = <T as frame_system::Config>::RuntimeCall, Pre = (std::option::Option<_>, _)>,
| +++++++++++++++++++++++++++++++++++
|
using `map_err` over `inspect_err`:
pallets/template/src/lib.rs#L34
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]
|
|
using `clone` on type `bool` which implements the `Copy` trait:
traits/authn/src/util.rs#L181
warning: using `clone` on type `bool` which implements the `Copy` trait
--> traits/authn/src/util.rs:181:18
|
181 | Self(self.0.clone(), PhantomData)
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `bool` which implements the `Copy` trait:
traits/authn/src/util.rs#L169
warning: using `clone` on type `bool` which implements the `Copy` trait
--> traits/authn/src/util.rs:169:18
|
169 | Self(self.0.clone(), PhantomData)
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
using `map_err` over `inspect_err`:
pallets/gas-transaction-payment/src/lib.rs#L32
warning: using `map_err` over `inspect_err`
--> pallets/gas-transaction-payment/src/lib.rs:32:15
|
32 | #[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
|
32 - #[pallet::pallet]
32 + #[pallet::&inspect_err]
|
|