@@ -844,8 +844,8 @@ impl Node {
844844 }
845845
846846 /// Returns our own listening address.
847- pub fn listening_address ( & self ) -> Option < & SocketAddr > {
848- self . config . listening_address . as_ref ( )
847+ pub fn listening_address ( & self ) -> Option < SocketAddr > {
848+ self . config . listening_address
849849 }
850850
851851 /// Retrieve a new on-chain/funding address.
@@ -939,7 +939,7 @@ impl Node {
939939 ///
940940 /// Will also remove the peer from the peer store, i.e., after this has been called we won't
941941 /// try to reconnect on restart.
942- pub fn disconnect ( & self , counterparty_node_id : & PublicKey ) -> Result < ( ) , Error > {
942+ pub fn disconnect ( & self , counterparty_node_id : PublicKey ) -> Result < ( ) , Error > {
943943 let rt_lock = self . runtime . read ( ) . unwrap ( ) ;
944944 if rt_lock. is_none ( ) {
945945 return Err ( Error :: NotRunning ) ;
@@ -954,7 +954,7 @@ impl Node {
954954 }
955955 }
956956
957- self . peer_manager . disconnect_by_node_id ( * counterparty_node_id) ;
957+ self . peer_manager . disconnect_by_node_id ( counterparty_node_id) ;
958958 Ok ( ( ) )
959959 }
960960
@@ -1112,10 +1112,10 @@ impl Node {
11121112
11131113 /// Close a previously opened channel.
11141114 pub fn close_channel (
1115- & self , channel_id : & [ u8 ; 32 ] , counterparty_node_id : & PublicKey ,
1115+ & self , channel_id : & [ u8 ; 32 ] , counterparty_node_id : PublicKey ,
11161116 ) -> Result < ( ) , Error > {
1117- self . peer_store . remove_peer ( counterparty_node_id) ?;
1118- match self . channel_manager . close_channel ( channel_id, counterparty_node_id) {
1117+ self . peer_store . remove_peer ( & counterparty_node_id) ?;
1118+ match self . channel_manager . close_channel ( channel_id, & counterparty_node_id) {
11191119 Ok ( _) => Ok ( ( ) ) ,
11201120 Err ( _) => Err ( Error :: ChannelClosingFailed ) ,
11211121 }
@@ -1277,7 +1277,7 @@ impl Node {
12771277
12781278 /// Send a spontaneous, aka. "keysend", payment
12791279 pub fn send_spontaneous_payment (
1280- & self , amount_msat : u64 , node_id : & PublicKey ,
1280+ & self , amount_msat : u64 , node_id : PublicKey ,
12811281 ) -> Result < PaymentHash , Error > {
12821282 let rt_lock = self . runtime . read ( ) . unwrap ( ) ;
12831283 if rt_lock. is_none ( ) {
@@ -1289,7 +1289,7 @@ impl Node {
12891289
12901290 let route_params = RouteParameters {
12911291 payment_params : PaymentParameters :: from_node_id (
1292- * node_id,
1292+ node_id,
12931293 self . config . default_cltv_expiry_delta ,
12941294 ) ,
12951295 final_value_msat : amount_msat,
0 commit comments