From 0984aa6c0a72172200f5d311ba929d3fdc3db69d Mon Sep 17 00:00:00 2001 From: Alistair Singh Date: Tue, 12 Dec 2023 01:40:40 +0200 Subject: [PATCH] use matches! --- .../src/bridge_to_ethereum_config.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs index 490163a6814eb..9498ddcb34f80 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs @@ -12,13 +12,10 @@ use snowbridge_router_primitives::outbound::EthereumBlobExporter; pub struct NonAssetHubTokenTransfers; impl ContainsPair for NonAssetHubTokenTransfers { fn contains(origin: &InteriorMultiLocation, message: &Message) -> bool { - if let Command::AgentExecute { - command: AgentExecuteCommand::TransferToken { .. }, .. - } = message.command - { - return origin != &X1(Parachain(ASSET_HUB_ID)); - } - return false; + matches!( + message.command, + Command::AgentExecute { command: AgentExecuteCommand::TransferToken { .. }, .. } + ) && origin != &X1(Parachain(ASSET_HUB_ID)) } }