Skip to content

feat: Updated weights #25

feat: Updated weights

feat: Updated weights #25

GitHub Actions / clippy succeeded Jan 29, 2025 in 0s

clippy

36 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 36
Note 0
Help 0

Versions

  • rustc 1.84.0 (9fc6b4312 2025-01-07)
  • cargo 1.84.0 (66221abde 2024-11-19)
  • clippy 0.1.84 (9fc6b43126 2025-01-07)

Annotations

Check warning on line 26 in runtime/kreivo/src/config/governance/origins.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `map_err` over `inspect_err`

warning: using `map_err` over `inspect_err`
  --> runtime/kreivo/src/config/governance/origins.rs:26:12
   |
26 |     #[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
   |
26 -     #[pallet::pallet]
26 +     #[pallet::&inspect_err]
   |

Check warning on line 84 in runtime/kreivo/src/config/communities/memberships.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `u16`

warning: useless conversion to the same type: `u16`
  --> runtime/kreivo/src/config/communities/memberships.rs:84:3
   |
84 |         id.into()
   |         ^^^^^^^^^ help: consider removing `.into()`: `id`
   |
   = 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 35 in runtime/kreivo/src/config/communities/governance.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u16` which implements the `Copy` trait

warning: using `clone` on type `u16` which implements the `Copy` trait
  --> runtime/kreivo/src/config/communities/governance.rs:35:49
   |
35 |         Ok(pallet_communities::Origin::<Runtime>::new(id.clone()).into())
   |                                                       ^^^^^^^^^^ help: try dereferencing it: `*id`
   |
   = 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 74 in runtime/kreivo/src/benchmarking/impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this operation has no effect

warning: this operation has no effect
  --> runtime/kreivo/src/benchmarking/impls.rs:74:25
   |
74 |         Asset { fun: Fungible(1 * UNITS), id: AssetId(RelayLocation::get()) },
   |                               ^^^^^^^^^ help: consider reducing it to: `UNITS`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
   = note: `#[warn(clippy::identity_op)]` on by default

Check warning on line 20 in apis/src/runtime/assets.rs

See this annotation in the file changed.

@github-actions 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
  --> apis/src/runtime/assets.rs:20:3
   |
20 |         &self.1
   |         ^^^^^^^ help: change this to: `self.1`
   |
   = 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 37 in apis/src/apis/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

operator precedence can trip the unwary

warning: operator precedence can trip the unwary
  --> apis/src/apis/error.rs:37:39
   |
37 |             KreivoApisError::Assets(e) => Self(1u32 << 16 | e as u16 as u32),
   |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(1u32 << 16) | e as u16 as u32`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
   = note: `#[warn(clippy::precedence)]` on by default

Check warning on line 113 in pallets/communities-manager/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `map_err` over `inspect_err`

warning: using `map_err` over `inspect_err`
   --> pallets/communities-manager/src/lib.rs:113:12
    |
113 |     #[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
    |
113 -     #[pallet::pallet]
113 +     #[pallet::&inspect_err]
    |

Check warning on line 272 in /home/runner/.cargo/git/checkouts/polkadot-sdk-3d4658ffc5e737d7/d13cf29/polkadot/runtime/common/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `fast-runtime`

warning: unexpected `cfg` condition value: `fast-runtime`
  --> runtime/runtime-constants/src/lib.rs:60:51
   |
60 |     pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = prod_or_fast!(HOURS, MINUTES);
   |                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `default`, `paseo`, and `std`
   = note: using a cfg inside a macro will use the cfgs from the destination crate and not the ones from the defining crate
   = help: try referring to `prod_or_fast` crate for guidance on how handle this unexpected cfg
   = help: the macro `prod_or_fast` may come from an old version of the `polkadot_runtime_common` crate, try updating your dependency with `cargo update -p polkadot_runtime_common`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default
   = note: this warning originates in the macro `prod_or_fast` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 155 in pallets/communities/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `map_err` over `inspect_err`

warning: using `map_err` over `inspect_err`
   --> pallets/communities/src/lib.rs:155:12
    |
155 |     #[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
    |
155 -     #[pallet::pallet]
155 +     #[pallet::&inspect_err]
    |

Check warning on line 569 in pallets/communities/src/lib.rs

See this annotation in the file changed.

@github-actions 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/communities/src/lib.rs:569:29
    |
569 |         pub fn dispatch_as_account(origin: OriginFor<T>, call: Box<RuntimeCallFor<T>>) -> 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 569 in pallets/communities/src/lib.rs

See this annotation in the file changed.

@github-actions 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/communities/src/lib.rs:569:29
    |
569 |         pub fn dispatch_as_account(origin: OriginFor<T>, call: Box<RuntimeCallFor<T>>) -> DispatchResultWithPostInfo {
    |                                   ^ 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 151 in pallets/payments/src/lib.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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