From: Jeffrey Czyz Date: Thu, 16 May 2024 21:02:42 +0000 (-0500) Subject: Use implicit returns from match expressions X-Git-Tag: v0.0.124-beta~82^2~9 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=bccdf0d8e73730d99ad42279cdc2a35775c68a85;p=rust-lightning Use implicit returns from match expressions --- 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 }, } }