Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Updated weights #447

Merged
merged 9 commits into from
Jan 29, 2025

fix(kreivo-runtime): version bump and fix release command to include …

f8aa42e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feat: Updated weights #447

fix(kreivo-runtime): version bump and fix release command to include …
f8aa42e
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Jan 29, 2025 in 0s

clippy

31 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 31
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 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 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 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 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

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: `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

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: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

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: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

See this annotation in the file changed.

@github-actions 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 warning on line 103 in pallets/payments/src/benchmarking.rs

See this annotation in the file changed.

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