diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-08-23 14:34:33 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-09-05 15:51:52 +0200 |
| commit | c9f6d0ebf36ff00a1778bf51e10d9e227e0c894b (patch) | |
| tree | 3515a87fd3e321a272b415d9504c8501aa66ae6d /mullvad-daemon/src | |
| parent | fb40dedf46348e8764aed95610b135e40c3b1ba1 (diff) | |
| download | mullvadvpn-c9f6d0ebf36ff00a1778bf51e10d9e227e0c894b.tar.xz mullvadvpn-c9f6d0ebf36ff00a1778bf51e10d9e227e0c894b.zip | |
Include individual relays in get_relay_locations
Diffstat (limited to 'mullvad-daemon/src')
| -rw-r--r-- | mullvad-daemon/src/relays.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs index 86d4efbc51..45aabcba1d 100644 --- a/mullvad-daemon/src/relays.rs +++ b/mullvad-daemon/src/relays.rs @@ -70,8 +70,9 @@ impl ParsedRelays { let city_code = city.code.clone(); let latitude = city.latitude; let longitude = city.longitude; - relays.extend(city.relays.drain(..).map(|mut relay| { - relay.location = Some(Location { + for relay in &mut city.relays { + let mut relay_with_location = relay.clone(); + relay_with_location.location = Some(Location { country: country_name.clone(), country_code: country_code.clone(), city: city_name.clone(), @@ -79,8 +80,9 @@ impl ParsedRelays { latitude, longitude, }); - relay - })); + relays.push(relay_with_location); + relay.tunnels.clear(); + } } } ParsedRelays { |
