Skip to content

Commit dee2d7f

Browse files
clippy: avoid manual implementation of ok
``` error: manual implementation of `ok` --> lightning/src/ln/channel.rs:8551:3 | 8551 | / match self.sign_channel_announcement(node_signer, announcement) { 8552 | | Ok(res) => Some(res), 8553 | | Err(_) => None, 8554 | | } | |_________^ help: replace with: `self.sign_channel_announcement(node_signer, announcement).ok()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err = note: `-D clippy::manual-ok-err` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::manual_ok_err)]` ``` Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 218697f commit dee2d7f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: lightning/src/ln/channel.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8548,10 +8548,7 @@ impl<SP: Deref> FundedChannel<SP> where
85488548
Ok(res) => res,
85498549
Err(_) => return None,
85508550
};
8551-
match self.sign_channel_announcement(node_signer, announcement) {
8552-
Ok(res) => Some(res),
8553-
Err(_) => None,
8554-
}
8551+
self.sign_channel_announcement(node_signer, announcement).ok()
85558552
}
85568553

85578554
/// May panic if called on a channel that wasn't immediately-previously

0 commit comments

Comments
 (0)