Skip to content

Commit c4f368b

Browse files
authored
minor cosmetic updates (#1985)
1 parent bef11ac commit c4f368b

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

bin/runtime-common/src/messages_xcm_extension.rs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,24 @@ impl<HaulerOrigin, H: XcmBlobHauler<MessageSenderOrigin = HaulerOrigin>> HaulBlo
159159
{
160160
fn haul_blob(blob: sp_std::prelude::Vec<u8>) -> Result<(), HaulBlobError> {
161161
let lane = H::xcm_lane();
162-
let result = H::MessageSender::send_message(H::message_sender_origin(), lane, blob);
163-
let result = result
164-
.map(|artifacts| (lane, artifacts.nonce).using_encoded(sp_io::hashing::blake2_256));
165-
match &result {
166-
Ok(result) => log::info!(
167-
target: crate::LOG_TARGET_BRIDGE_DISPATCH,
168-
"haul_blob result - ok: {:?} on lane: {:?}",
169-
result,
170-
lane
171-
),
172-
Err(error) => log::error!(
173-
target: crate::LOG_TARGET_BRIDGE_DISPATCH,
174-
"haul_blob result - error: {:?} on lane: {:?}",
175-
error,
176-
lane
177-
),
178-
};
179-
result.map(|_| ()).map_err(|_| HaulBlobError::Transport("MessageSenderError"))
162+
H::MessageSender::send_message(H::message_sender_origin(), lane, blob)
163+
.map(|artifacts| (lane, artifacts.nonce).using_encoded(sp_io::hashing::blake2_256))
164+
.map(|result| {
165+
log::info!(
166+
target: crate::LOG_TARGET_BRIDGE_DISPATCH,
167+
"haul_blob result - ok: {:?} on lane: {:?}",
168+
result,
169+
lane
170+
)
171+
})
172+
.map_err(|error| {
173+
log::error!(
174+
target: crate::LOG_TARGET_BRIDGE_DISPATCH,
175+
"haul_blob result - error: {:?} on lane: {:?}",
176+
error,
177+
lane
178+
);
179+
HaulBlobError::Transport("MessageSenderError")
180+
})
180181
}
181182
}

0 commit comments

Comments
 (0)