Skip to content

Commit 4955e00

Browse files
committed
f - Remove unnecessary clone
1 parent 0dfeb61 commit 4955e00

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning-net-tokio/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ impl Connection {
128128
CMH: ChannelMessageHandler + 'static,
129129
RMH: RoutingMessageHandler + 'static,
130130
L: Logger + 'static + ?Sized {
131-
let peer_manager_ref = peer_manager.clone();
132131
// 8KB is nice and big but also should never cause any issues with stack overflowing.
133132
let mut buf = [0; 8192];
134133

@@ -201,7 +200,7 @@ impl Connection {
201200
let _ = writer.shutdown().await;
202201
}
203202
if let Disconnect::PeerDisconnected = disconnect_type {
204-
peer_manager_ref.socket_disconnected(&our_descriptor);
203+
peer_manager.socket_disconnected(&our_descriptor);
205204
}
206205
}
207206

0 commit comments

Comments
 (0)