Revamp all CI jobs #501
clippy
3 errors, 32 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 3 |
Warning | 32 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 151 in pallets/payments/src/lib.rs
github-actions / clippy
using `map_err` over `inspect_err`
warning: using `map_err` over `inspect_err`
--> pallets/payments/src/lib.rs:151:12
|
151 | #[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
|
151 - #[pallet::pallet]
151 + #[pallet::&inspect_err]
|
Check warning on line 492 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:492:25
|
492 | pub fn resolve_dispute(
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 492 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:492:25
|
492 | pub fn resolve_dispute(
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 466 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:466:25
|
466 | pub fn request_payment(
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 466 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:466:25
|
466 | pub fn request_payment(
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 427 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:427:24
|
427 | pub fn dispute_refund(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 427 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:427:24
|
427 | pub fn dispute_refund(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 396 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:396:16
|
396 | pub fn cancel(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 396 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:396:16
|
396 | pub fn cancel(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 358 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:358:24
|
358 | pub fn accept_and_pay(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 358 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:358:24
|
358 | pub fn accept_and_pay(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 321 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:321:24
|
321 | pub fn request_refund(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 321 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:321:24
|
321 | pub fn request_refund(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 304 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:304:17
|
304 | pub fn release(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 304 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:304:17
|
304 | pub fn release(origin: OriginFor<T>, payment_id: T::PaymentId) -> DispatchResultWithPostInfo {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 267 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
warning: useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`
--> pallets/payments/src/lib.rs:267:13
|
267 | pub fn pay(
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 267 in pallets/payments/src/lib.rs
github-actions / clippy
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
warning: useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`
--> pallets/payments/src/lib.rs:267:13
|
267 | pub fn pay(
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
Check warning on line 241 in pallets/payments/src/benchmarking.rs
github-actions / clippy
using `clone` on type `<T as Config>::AssetsBalance` which implements the `Copy` trait
warning: using `clone` on type `<T as Config>::AssetsBalance` which implements the `Copy` trait
--> pallets/payments/src/benchmarking.rs:241:4
|
241 | amount.clone(),
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `amount`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check failure on line 117 in pallets/payments/src/benchmarking.rs
github-actions / clippy
equal expressions as operands to `==`
error: equal expressions as operands to `==`
--> pallets/payments/src/benchmarking.rs:117:45
|
117 | if asset == asset && amount == amount && remark == remark
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
Check failure on line 117 in pallets/payments/src/benchmarking.rs
github-actions / clippy
equal expressions as operands to `==`
error: equal expressions as operands to `==`
--> pallets/payments/src/benchmarking.rs:117:25
|
117 | if asset == asset && amount == amount && remark == remark
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
Check failure on line 117 in pallets/payments/src/benchmarking.rs
github-actions / clippy
equal expressions as operands to `==`
error: equal expressions as operands to `==`
--> pallets/payments/src/benchmarking.rs:117:7
|
117 | if asset == asset && amount == amount && remark == remark
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
= note: `#[deny(clippy::eq_op)]` on by default
Check warning on line 103 in pallets/payments/src/benchmarking.rs
github-actions / clippy
casting integer literal to `u8` is unnecessary
warning: casting integer literal to `u8` is unnecessary
--> pallets/payments/src/benchmarking.rs:103:35
|
103 | Some(BoundedVec::try_from(vec![1 as u8; q as usize]).unwrap())
| ^^^^^^^ help: try: `1_u8`
|
= 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 70 in pallets/payments/src/benchmarking.rs
github-actions / clippy
using `clone` on type `<T as Config>::AssetsBalance` which implements the `Copy` trait
warning: using `clone` on type `<T as Config>::AssetsBalance` which implements the `Copy` trait
--> pallets/payments/src/benchmarking.rs:70:3
|
70 | amount.clone(),
| ^^^^^^^^^^^^^^ help: try dereferencing it: `*amount`
|
= 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
Check warning on line 64 in pallets/payments/src/benchmarking.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/payments/src/benchmarking.rs:64:52
|
64 | create_and_mint_asset::<T>(&sender, &beneficiary, &asset)?;
| ^^^^^^ help: change this to: `asset`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 62 in pallets/payments/src/benchmarking.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> pallets/payments/src/benchmarking.rs:53:6
|
53 | ) -> Result<
| ______^
54 | | (
55 | | T::PaymentId,
56 | | T::AccountId,
... |
61 | | BenchmarkError,
62 | | > {
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default