Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Jan 13, 2025
1 parent fc67932 commit 2e365e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions swapd/src/chain/memchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ impl<'a> ForwardChainIterator<'a> {
impl<'a> Iterator for ForwardChainIterator<'a> {
type Item = &'a BlockHeader;
fn next(&mut self) -> Option<&'a BlockHeader> {
let current = match self.current {
Some(current) => current,
None => return None,
};

let current = self.current?;
self.current = match current.next {
Some(next) => Some(
self.chain
Expand Down Expand Up @@ -223,11 +219,7 @@ impl<'a> BackwardChainIterator<'a> {
impl<'a> Iterator for BackwardChainIterator<'a> {
type Item = &'a BlockHeader;
fn next(&mut self) -> Option<&'a BlockHeader> {
let current = match self.current {
Some(current) => current,
None => return None,
};

let current = self.current?;
self.current = match current.header.hash == self.chain.base {
true => None,
false => Some(
Expand Down
2 changes: 1 addition & 1 deletion swapd/src/cln/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl LightningClient for Client {
}
}

async fn wait_payment<'a>(
async fn wait_payment(
client: &mut NodeClient<Channel>,
payment_hash: sha256::Hash,
) -> Result<Option<PaymentResult>, LightningError> {
Expand Down

0 comments on commit 2e365e5

Please sign in to comment.