mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 10:57:56 +00:00
ci: add quick-check with rustfmt (#615)
* ci: add quick-check with clippy and rustfmt * chore: rustfmt round * chore: set the same rustfmt config than substrate * chore: fix formatting * cI: remove clippy * ci: switch to nightly for the checks * ci: fix toolchains and naming * ci: Limit the check to formatting * chore: fix formatting * Update .rustfmt.toml * Update .rustfmt.toml Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use sp_std::marker::PhantomData;
|
||||
use codec::Encode;
|
||||
use cumulus_primitives_core::UpwardMessageSender;
|
||||
use xcm::{WrapVersion, latest::prelude::*};
|
||||
use sp_std::marker::PhantomData;
|
||||
use xcm::{latest::prelude::*, WrapVersion};
|
||||
|
||||
/// Xcm router which recognises the `Parent` destination and handles it by sending the message into
|
||||
/// the given UMP `UpwardMessageSender` implementation. Thus this essentially adapts an
|
||||
@@ -36,12 +36,11 @@ impl<T: UpwardMessageSender, W: WrapVersion> SendXcm for ParentAsUmp<T, W> {
|
||||
fn send_xcm(dest: MultiLocation, msg: Xcm<()>) -> Result<(), SendError> {
|
||||
if dest.contains_parents_only(1) {
|
||||
// An upward message for the relay chain.
|
||||
let versioned_xcm = W::wrap_version(&dest, msg)
|
||||
.map_err(|()| SendError::DestinationUnsupported)?;
|
||||
let versioned_xcm =
|
||||
W::wrap_version(&dest, msg).map_err(|()| SendError::DestinationUnsupported)?;
|
||||
let data = versioned_xcm.encode();
|
||||
|
||||
T::send_upward_message(data)
|
||||
.map_err(|e| SendError::Transport(e.into()))?;
|
||||
T::send_upward_message(data).map_err(|e| SendError::Transport(e.into()))?;
|
||||
|
||||
Ok(())
|
||||
} else {
|
||||
@@ -50,4 +49,3 @@ impl<T: UpwardMessageSender, W: WrapVersion> SendXcm for ParentAsUmp<T, W> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user