From bccdf0d8e73730d99ad42279cdc2a35775c68a85 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Thu, 16 May 2024 16:02:42 -0500 Subject: [PATCH] Use implicit returns from match expressions --- lightning/src/ln/channelmanager.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 80b98b2b6..815c0b460 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -10272,8 +10272,8 @@ where }; match response { - Ok(invoice) => return responder.respond(OffersMessage::Invoice(invoice)), - Err(error) => return responder.respond(OffersMessage::InvoiceError(error.into())), + Ok(invoice) => responder.respond(OffersMessage::Invoice(invoice)), + Err(error) => responder.respond(OffersMessage::InvoiceError(error.into())), } }, OffersMessage::Invoice(invoice) => { @@ -10300,14 +10300,14 @@ where self.logger, "A response was generated, but there is no reply_path specified for sending the response." ); - return ResponseInstruction::NoResponse; + ResponseInstruction::NoResponse } - _ => return ResponseInstruction::NoResponse, + _ => ResponseInstruction::NoResponse, } }, OffersMessage::InvoiceError(invoice_error) => { log_trace!(self.logger, "Received invoice_error: {}", invoice_error); - return ResponseInstruction::NoResponse; + ResponseInstruction::NoResponse }, } } -- 2.39.5