From 2e508f23e3fda5a3597ba712dad879ab115acff5 Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Fri, 6 Oct 2023 19:42:34 +0200 Subject: [PATCH] fix clippy warning --- libs/sdk-core/src/breez_services.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/sdk-core/src/breez_services.rs b/libs/sdk-core/src/breez_services.rs index 26925f202..57c88200f 100644 --- a/libs/sdk-core/src/breez_services.rs +++ b/libs/sdk-core/src/breez_services.rs @@ -773,9 +773,7 @@ impl BreezServices { /// Connects to the selected LSP, if any async fn connect_lsp_peer(&self) -> Result<()> { - let lsp = self.lsp_info().await.ok(); - if lsp.is_some() { - let lsp_info = lsp.unwrap().clone(); + if let Ok(lsp_info) = self.lsp_info().await { let node_id = lsp_info.pubkey; let address = lsp_info.host; debug!("connecting to lsp {}@{}", node_id.clone(), address.clone());