Skip to content

Commit 2a8c937

Browse files
committed
f map accountable straight to bool rather than using option
1 parent 6bcd1b6 commit 2a8c937

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/msgs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ pub fn accountable_from_bool(value: bool) -> ExperimentalAccountable {
788788
}
789789

790790
/// Converts the accountable signal on the wire to a boolean signal.
791-
pub fn accountable_into_bool(accountable: ExperimentalAccountable) -> Option<bool> {
792-
accountable.map(|v| v == 7)
791+
pub fn accountable_into_bool(accountable: ExperimentalAccountable) -> bool {
792+
accountable.is_some_and(|v| v == 7)
793793
}
794794

795795
/// An [`onion message`] to be sent to or received from a peer.

0 commit comments

Comments
 (0)