mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 16:02:32 +00:00
Fixing cargo clippy clone_on_copy issues
This commit is contained in:
1 parent
ea66bd9938
commit
dbee706608
3 files changed
+5
-5
No files matched your search
@@ -222,7 +222,7 @@ impl NetworkInboundListener {
|
||||
let listen_addr = SocketAddr::new(self.address.parse()?, self.port);
|
||||
// Check whether this inbound listens on TCP.
|
||||
if self.handler.stream().is_ok() {
|
||||
let listen_addr_cloned = listen_addr.clone();
|
||||
let listen_addr_cloned = listen_addr;
|
||||
let handler_cloned = self.handler.clone();
|
||||
let dispatcher_cloned = self.dispatcher.clone();
|
||||
let nat_manager_cloned = self.nat_manager.clone();
|
||||
@@ -241,7 +241,7 @@ impl NetworkInboundListener {
|
||||
}
|
||||
// Check whether this inbound binds on UDP.
|
||||
if self.handler.datagram().is_ok() {
|
||||
let listen_addr_cloned = listen_addr.clone();
|
||||
let listen_addr_cloned = listen_addr;
|
||||
let handler_cloned = self.handler.clone();
|
||||
let dispatcher_cloned = self.dispatcher.clone();
|
||||
let nat_manager_cloned = self.nat_manager.clone();
|
||||
|
||||
@@ -424,7 +424,7 @@ pub async fn connect_datagram_outbound(
|
||||
Ok(Some(OutboundTransport::Datagram(Box::new(
|
||||
DomainAssociatedOutboundDatagram::new(
|
||||
socket,
|
||||
sess.source.clone(),
|
||||
sess.source,
|
||||
SocksAddr::Domain(domain.to_owned(), port.to_owned()),
|
||||
dns_client.clone(),
|
||||
),
|
||||
|
||||
@@ -34,8 +34,8 @@ async fn handle_inbound_stream(
|
||||
let mut sess = Session {
|
||||
network: Network::Tcp,
|
||||
source: local_addr,
|
||||
local_addr: remote_addr.clone(),
|
||||
destination: SocksAddr::Ip(remote_addr.clone()),
|
||||
local_addr: remote_addr,
|
||||
destination: SocksAddr::Ip(remote_addr),
|
||||
inbound_tag: inbound_tag,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user