summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2020-02-21 14:13:02 +0100
committerLinus Färnstrand <linus@mullvad.net>2020-02-21 21:26:54 +0100
commit680102a1170e904ff9d8e09d292318798fa0b4dc (patch)
tree310259feb3cba2012fdb61267117a5fc6ea7e7d7
parent002050d7e8e79943f949f7259e086ccdeb647d39 (diff)
downloadmullvadvpn-680102a1170e904ff9d8e09d292318798fa0b4dc.tar.xz
mullvadvpn-680102a1170e904ff9d8e09d292318798fa0b4dc.zip
Use shared references instead of mutable ones in relay selector
-rw-r--r--mullvad-daemon/src/relays.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs
index 89117988e7..da25e41403 100644
--- a/mullvad-daemon/src/relays.rs
+++ b/mullvad-daemon/src/relays.rs
@@ -82,17 +82,17 @@ impl ParsedRelays {
}
}
- pub fn from_relay_list(mut relay_list: RelayList, last_updated: SystemTime) -> Self {
+ pub fn from_relay_list(relay_list: RelayList, last_updated: SystemTime) -> Self {
let mut relays = Vec::new();
- for country in &mut relay_list.countries {
+ for country in &relay_list.countries {
let country_name = country.name.clone();
let country_code = country.code.clone();
- for city in &mut country.cities {
+ for city in &country.cities {
let city_name = city.name.clone();
let city_code = city.code.clone();
let latitude = city.latitude;
let longitude = city.longitude;
- for relay in &mut city.relays {
+ for relay in &city.relays {
let mut relay_with_location = relay.clone();
relay_with_location.location = Some(Location {
country: country_name.clone(),