diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-09-08 16:27:39 +0200 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2025-09-08 16:33:35 +0200 |
| commit | 7e589578a517189bc77211c9f3c1c0696e76c2da (patch) | |
| tree | 2315de1ef771aa189f7740fbac9c4f5be69a520d | |
| parent | e45a74afacca13bcf0a5e46bd26ea56eb0651477 (diff) | |
| download | mullvadvpn-7e589578a517189bc77211c9f3c1c0696e76c2da.tar.xz mullvadvpn-7e589578a517189bc77211c9f3c1c0696e76c2da.zip | |
Fix lint `clippy::implicit_clone`
| -rw-r--r-- | mullvad-cli/src/cmds/custom_list.rs | 4 | ||||
| -rw-r--r-- | mullvad-cli/src/format.rs | 2 | ||||
| -rw-r--r-- | mullvad-masque-proxy/src/server/mod.rs | 2 | ||||
| -rw-r--r-- | talpid-dbus/src/network_manager.rs | 4 | ||||
| -rw-r--r-- | talpid-openvpn/src/lib.rs | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/mullvad-cli/src/cmds/custom_list.rs b/mullvad-cli/src/cmds/custom_list.rs index 4a367b0be0..a2ee07c970 100644 --- a/mullvad-cli/src/cmds/custom_list.rs +++ b/mullvad-cli/src/cmds/custom_list.rs @@ -209,9 +209,9 @@ impl<'a> GeographicLocationConstraintFormatter<'a> { }; let country = - country_code.and_then(|country_code| cache.lookup_country(country_code.to_string())); + country_code.and_then(|country_code| cache.lookup_country(country_code.clone())); let city = city_code.and_then(|city_code| { - country.and_then(|country| country.lookup_city(city_code.to_string())) + country.and_then(|country| country.lookup_city(city_code.clone())) }); Self { diff --git a/mullvad-cli/src/format.rs b/mullvad-cli/src/format.rs index f4c2c4914b..31369e7f3e 100644 --- a/mullvad-cli/src/format.rs +++ b/mullvad-cli/src/format.rs @@ -205,7 +205,7 @@ fn print_connection_info( } pub fn format_location(location: &GeoIpLocation) -> String { - let mut formatted_location = location.country.to_string(); + let mut formatted_location = location.country.clone(); if let Some(city) = &location.city { formatted_location.push_str(&format!(", {city}")); } diff --git a/mullvad-masque-proxy/src/server/mod.rs b/mullvad-masque-proxy/src/server/mod.rs index 2232fbdae2..996553a43a 100644 --- a/mullvad-masque-proxy/src/server/mod.rs +++ b/mullvad-masque-proxy/src/server/mod.rs @@ -190,7 +190,7 @@ impl Server { && &proxy_uri.hostname != hostname { let valid_uri = ProxyUri { - hostname: hostname.to_string(), + hostname: hostname.clone(), ..proxy_uri }; diff --git a/talpid-dbus/src/network_manager.rs b/talpid-dbus/src/network_manager.rs index cd16677670..623aab3326 100644 --- a/talpid-dbus/src/network_manager.rs +++ b/talpid-dbus/src/network_manager.rs @@ -529,9 +529,9 @@ impl NetworkManager { for (top_key, map) in settings.iter() { let mut inner_dict = HashMap::<String, Variant<Box<dyn RefArg>>>::new(); for (key, variant) in map.iter() { - inner_dict.insert(key.to_string(), Variant(variant.0.box_clone())); + inner_dict.insert(key.clone(), Variant(variant.0.box_clone())); } - settings_backup.insert(top_key.to_string(), inner_dict); + settings_backup.insert(top_key.clone(), inner_dict); } // Update the DNS config diff --git a/talpid-openvpn/src/lib.rs b/talpid-openvpn/src/lib.rs index 30103d59a4..5f96c46f0c 100644 --- a/talpid-openvpn/src/lib.rs +++ b/talpid-openvpn/src/lib.rs @@ -345,7 +345,7 @@ impl OpenVpnMonitor<OpenVpnCommand> { #[cfg(target_os = "linux")] fn extract_routes(env: &HashMap<String, String>) -> Result<HashSet<RequiredRoute>> { let tun_interface = env.get("dev").ok_or(Error::MissingTunnelInterface)?; - let tun_node = talpid_routing::Node::device(tun_interface.to_string()); + let tun_node = talpid_routing::Node::device(tun_interface.clone()); let mut routes = HashSet::new(); for network in &["0.0.0.0/0".parse().unwrap(), "::/0".parse().unwrap()] { routes.insert(RequiredRoute::new(*network, tun_node.clone()).use_main_table(false)); @@ -908,7 +908,7 @@ mod event_server { let tunnel_alias = env .get("dev") .ok_or_else(|| tonic::Status::invalid_argument("missing tunnel alias"))? - .to_string(); + .clone(); let mut ips = vec