Skip to content

feat: Updated weights #25

feat: Updated weights

feat: Updated weights #25

Triggered via pull request January 29, 2025 22:10
@pandres95pandres95
synchronize #447
Status Success
Total duration 26s
Artifacts

lint-pr.yml

on: pull_request_target
Validate PR title for conventional commit compliance
3s
Validate PR title for conventional commit compliance
Fit to window
Zoom out
Zoom in

Annotations

36 warnings
using `map_err` over `inspect_err`: runtime/kreivo/src/config/governance/origins.rs#L26
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] |
useless conversion to the same type: `u16`: runtime/kreivo/src/config/communities/memberships.rs#L84
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
using `clone` on type `u16` which implements the `Copy` trait: runtime/kreivo/src/config/communities/governance.rs#L35
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
this operation has no effect: runtime/kreivo/src/benchmarking/impls.rs#L74
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
this expression creates a reference which is immediately dereferenced by the compiler: apis/src/runtime/assets.rs#L20
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
operator precedence can trip the unwary: apis/src/apis/error.rs#L37
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
using `map_err` over `inspect_err`: pallets/communities-manager/src/lib.rs#L113
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] |
unexpected `cfg` condition value: `fast-runtime`: /home/runner/.cargo/git/checkouts/polkadot-sdk-3d4658ffc5e737d7/d13cf29/polkadot/runtime/common/src/lib.rs#L272
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)
using `map_err` over `inspect_err`: pallets/communities/src/lib.rs#L155
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] |
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/communities/src/lib.rs#L569
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/communities/src/lib.rs#L569
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
using `map_err` over `inspect_err`: pallets/payments/src/lib.rs#L151
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] |
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L492
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L492
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L466
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L466
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L427
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L427
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L396
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L396
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L358
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L358
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L321
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L321
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L304
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L304
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
useless conversion to the same type: `frame_support::dispatch::PostDispatchInfo`: pallets/payments/src/lib.rs#L267
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
useless conversion to the same type: `sp_runtime::DispatchErrorWithPostInfo<frame_support::dispatch::PostDispatchInfo>`: pallets/payments/src/lib.rs#L267
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
using `clone` on type `<T as Config>::AssetsBalance` which implements the `Copy` trait: pallets/payments/src/benchmarking.rs#L241
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
casting integer literal to `u8` is unnecessary: pallets/payments/src/benchmarking.rs#L103
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
using `clone` on type `<T as Config>::AssetsBalance` which implements the `Copy` trait: pallets/payments/src/benchmarking.rs#L70
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
this expression creates a reference which is immediately dereferenced by the compiler: pallets/payments/src/benchmarking.rs#L64
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
very complex type used. Consider factoring parts into `type` definitions: pallets/payments/src/benchmarking.rs#L53
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
this expression creates a reference which is immediately dereferenced by the compiler: pallets/payments/src/benchmarking.rs#L44
warning: this expression creates a reference which is immediately dereferenced by the compiler --> pallets/payments/src/benchmarking.rs:44:38 | 44 | T::Assets::mint_into(asset.clone(), &beneficiary, <BalanceOf<T>>::from(10000000u32))?; | ^^^^^^^^^^^^ help: change this to: `beneficiary` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: pallets/payments/src/benchmarking.rs#L43
warning: this expression creates a reference which is immediately dereferenced by the compiler --> pallets/payments/src/benchmarking.rs:43:38 | 43 | T::Assets::mint_into(asset.clone(), &sender, <BalanceOf<T>>::from(10000000u32))?; | ^^^^^^^ help: change this to: `sender` | = 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
this import is redundant: pallets/payments/src/benchmarking.rs#L15
warning: this import is redundant --> pallets/payments/src/benchmarking.rs:15:1 | 15 | use log; | ^^^^^^^^ help: remove it entirely | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports = note: `#[warn(clippy::single_component_path_imports)]` on by default