From 6252d96cb9555e8b407df8dd27b0b8ef359b74ef 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 2e4b52f15c9a..d0f8f6d5c3ea 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 @@ -28,13 +28,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)) } }