From 07bf3f67b194411a8053097049af7eaa3a973976 Mon Sep 17 00:00:00 2001 From: ligulfzhou Date: Sun, 12 May 2024 19:00:23 +0800 Subject: [PATCH] fmt --- mutiny-core/src/auth.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mutiny-core/src/auth.rs b/mutiny-core/src/auth.rs index 7088b2d31..812434e34 100644 --- a/mutiny-core/src/auth.rs +++ b/mutiny-core/src/auth.rs @@ -135,16 +135,13 @@ impl MutinyAuthClient { log_error!(self.logger, "Error receiving LNURL from ws: {e}"); MutinyError::LnUrlFailure })?; - let lnurl = match LnUrl::from_str(&lnurl_auth_str) { - Ok(l) => l, - Err(e) => { - log_error!( - self.logger, - "Error parsing LNURL string {lnurl_auth_str}: {e}" - ); - return Err(MutinyError::LnUrlFailure); - } - }; + let lnurl = LnUrl::from_str(&lnurl_auth_str).map_err(|e| { + log_error!( + self.logger, + "Error parsing LNURL string {lnurl_auth_str}: {e}" + ); + Err(MutinyError::LnUrlFailure) + })?; make_lnurl_auth_connection( self.auth.clone(),