Skip to content

Commit bccdf0d

Browse files
committed
Use implicit returns from match expressions
1 parent a666401 commit bccdf0d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10272,8 +10272,8 @@ where
1027210272
};
1027310273

1027410274
match response {
10275-
Ok(invoice) => return responder.respond(OffersMessage::Invoice(invoice)),
10276-
Err(error) => return responder.respond(OffersMessage::InvoiceError(error.into())),
10275+
Ok(invoice) => responder.respond(OffersMessage::Invoice(invoice)),
10276+
Err(error) => responder.respond(OffersMessage::InvoiceError(error.into())),
1027710277
}
1027810278
},
1027910279
OffersMessage::Invoice(invoice) => {
@@ -10300,14 +10300,14 @@ where
1030010300
self.logger,
1030110301
"A response was generated, but there is no reply_path specified for sending the response."
1030210302
);
10303-
return ResponseInstruction::NoResponse;
10303+
ResponseInstruction::NoResponse
1030410304
}
10305-
_ => return ResponseInstruction::NoResponse,
10305+
_ => ResponseInstruction::NoResponse,
1030610306
}
1030710307
},
1030810308
OffersMessage::InvoiceError(invoice_error) => {
1030910309
log_trace!(self.logger, "Received invoice_error: {}", invoice_error);
10310-
return ResponseInstruction::NoResponse;
10310+
ResponseInstruction::NoResponse
1031110311
},
1031210312
}
1031310313
}

0 commit comments

Comments
 (0)