Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

xcm-builder: remove clone for clippy #7291

Merged
merged 1 commit into from
May 25, 2023
Merged

xcm-builder: remove clone for clippy #7291

merged 1 commit into from
May 25, 2023

Conversation

michalkucharczyk
Copy link
Contributor

fix for:

error: using `clone` on type `[u8; 32]` which implements the `Copy`
trait
  --> xcm/xcm-builder/src/routing.rs:44:28
   |
44 |             message.0.push(SetTopic(unique_id.clone()));
   |                                     ^^^^^^^^^^^^^^^^^ help: try
removing the `clone` call: `unique_id`
   |
   = help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `-D clippy::clone-on-copy` implied by `-D clippy::complexity`

fix for:
```
error: using `clone` on type `[u8; 32]` which implements the `Copy`
trait
  --> xcm/xcm-builder/src/routing.rs:44:28
   |
44 |             message.0.push(SetTopic(unique_id.clone()));
   |                                     ^^^^^^^^^^^^^^^^^ help: try
removing the `clone` call: `unique_id`
   |
   = help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `-D clippy::clone-on-copy` implied by `-D clippy::complexity`
```
@michalkucharczyk michalkucharczyk added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels May 25, 2023
@michalkucharczyk michalkucharczyk requested a review from a team May 25, 2023 11:20
Copy link
Contributor

@mrcnski mrcnski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@michalkucharczyk
Copy link
Contributor Author

michalkucharczyk commented May 25, 2023

cumulus still failing:

[2023-05-25 11:31:20] error[E0053]: method `execute` has an incompatible type for trait
[2023-05-25 11:31:20]    --> pallets/dmp-queue/src/lib.rs:487:11
[2023-05-25 11:31:20]     |
[2023-05-25 11:31:20] 487 |             _hash: XcmHash,
[2023-05-25 11:31:20]     |                    ^^^^^^^
[2023-05-25 11:31:20]     |                    |
[2023-05-25 11:31:20]     |                    expected `&mut [u8; 32]`, found `[u8; 32]`
[2023-05-25 11:31:20]     |                    help: change the parameter type to match the trait: `&mut [u8; 32]`
[2023-05-25 11:31:20]     |
[2023-05-25 11:31:20]     = note: expected signature `fn(_, Weightless, &mut [u8; 32], cumulus_primitives_core::Weight) -> cumulus_primitives_core::Outcome`
[2023-05-25 11:31:20]                found signature `fn(_, Weightless, [u8; 32], cumulus_primitives_core::Weight) -> cumulus_primitives_core::Outcome`

@michalkucharczyk
Copy link
Contributor Author

michalkucharczyk commented May 25, 2023

fix for cumulus: paritytech/cumulus#2639
We need to wait for: paritytech/cumulus#2601
(or merge w/o cumulus).

@ordian ordian merged commit 41874c8 into master May 25, 2023
@ordian ordian deleted the mku-make-clippy-happy branch May 25, 2023 14:15
ordian added a commit that referenced this pull request May 25, 2023
* master:
  bump zombienet version (#7292)
  xcm-builder: remove clone for clippy (#7291)
ordian added a commit that referenced this pull request May 25, 2023
…slashing-client

* ao-past-session-slashing-runtime:
  bump zombienet version (#7292)
  xcm-builder: remove clone for clippy (#7291)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants