diff --git a/talpid-wireguard/src/lib.rs b/talpid-wireguard/src/lib.rs index bd43286ac17b..0f05314e72da 100644 --- a/talpid-wireguard/src/lib.rs +++ b/talpid-wireguard/src/lib.rs @@ -779,9 +779,8 @@ impl WireguardMonitor { #[cfg(target_os = "android")] let tunnel = if let Some(exit_peer) = &config.exit_peer { WgGoTunnel::start_multihop_tunnel( - #[allow(clippy::needless_borrow)] &config, - exit_peer.clone(), + exit_peer, log_path, tun_provider, routes, diff --git a/talpid-wireguard/src/wireguard_go/mod.rs b/talpid-wireguard/src/wireguard_go/mod.rs index 9dc2602fedb4..80bdc42982a8 100644 --- a/talpid-wireguard/src/wireguard_go/mod.rs +++ b/talpid-wireguard/src/wireguard_go/mod.rs @@ -126,7 +126,7 @@ impl WgGoTunnel { state.stop()?; Self::start_multihop_tunnel( config, - config.exit_peer.clone().unwrap(), + &config.exit_peer.clone().unwrap().clone(), log_path.as_deref(), tun_provider, routes, @@ -325,7 +325,7 @@ impl WgGoTunnel { pub fn start_multihop_tunnel( config: &Config, - exit_peer: PeerConfig, + exit_peer: &PeerConfig, log_path: Option<&Path>, tun_provider: Arc>, routes: impl Iterator,