@@ -75,7 +75,7 @@ impl<'a> PayjoinManager<'a> {
7575 let persister = payjoin:: persist:: NoopSessionPersister :: < ReceiverSessionEvent > :: default ( ) ;
7676
7777 let checked_max_fee_rate = max_fee_rate
78- . map ( |rate| FeeRate :: from_sat_per_kwu ( rate ) )
78+ . map ( FeeRate :: from_sat_per_kwu)
7979 . unwrap_or ( FeeRate :: BROADCAST_MIN ) ;
8080
8181 let receiver = payjoin:: receive:: v2:: ReceiverBuilder :: new (
@@ -296,7 +296,7 @@ impl<'a> PayjoinManager<'a> {
296296 . await
297297 }
298298 ReceiveSession :: HasReplyableError ( error) => self . handle_error ( error, persister) . await ,
299- ReceiveSession :: Closed ( _) => return Err ( Error :: Generic ( "Session closed" . to_string ( ) ) ) ,
299+ ReceiveSession :: Closed ( _) => Err ( Error :: Generic ( "Session closed" . to_string ( ) ) ) ,
300300 }
301301 }
302302
@@ -334,7 +334,7 @@ impl<'a> PayjoinManager<'a> {
334334 Err ( e) => {
335335 return Err ( Error :: Generic ( format ! (
336336 "Error occurred when polling for Payjoin proposal from the directory: {}" ,
337- e. to_string ( )
337+ e
338338 ) ) ) ;
339339 }
340340 }
@@ -637,16 +637,15 @@ impl<'a> PayjoinManager<'a> {
637637 return Err ( ImplementationError :: from ( "Cannot find the transaction in the mempool or the blockchain" ) ) ;
638638 } ;
639639
640- let is_seen = match tx_details. chain_position {
641- bdk_wallet:: chain:: ChainPosition :: Confirmed { .. } => true ,
642- bdk_wallet:: chain:: ChainPosition :: Unconfirmed { first_seen : Some ( _) , .. } => true ,
643- _ => false
644- } ;
640+ let is_seen = matches ! (
641+ tx_details. chain_position, bdk_wallet:: chain:: ChainPosition :: Confirmed { .. }
642+ | bdk_wallet:: chain:: ChainPosition :: Unconfirmed { first_seen: Some ( _) , .. }
643+ ) ;
645644
646645 if is_seen {
647646 return Ok ( Some ( tx_details. tx . as_ref ( ) . clone ( ) ) ) ;
648647 }
649- return Err ( ImplementationError :: from ( "Cannot find the transaction in the mempool or the blockchain" ) ) ;
648+ Err ( ImplementationError :: from ( "Cannot find the transaction in the mempool or the blockchain" ) )
650649 } ,
651650 |outpoint| {
652651 let utxo = self . wallet . get_utxo ( outpoint) ;
0 commit comments