summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-07-01 20:06:05 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-07-01 20:06:05 +0000
commit8c38691e32fb1788f391430b684905a268d66e2f (patch)
tree2b14fb1f8b2da359d1e765139fbd643de8d8cb30
parentdaff059b658184c6d8d8710361edc1b118b65753 (diff)
downloadmullvadvpn-8c38691e32fb1788f391430b684905a268d66e2f.tar.xz
mullvadvpn-8c38691e32fb1788f391430b684905a268d66e2f.zip
Simplify match arm
-rw-r--r--mullvad-daemon/src/lib.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs
index 0394a0fa54..1869047977 100644
--- a/mullvad-daemon/src/lib.rs
+++ b/mullvad-daemon/src/lib.rs
@@ -790,11 +790,7 @@ where
match &self.tunnel_state {
Disconnected => Box::new(self.get_geo_location().map(Some)),
Connecting { location, .. } => Box::new(future::result(Ok(location.clone()))),
- Disconnecting(..) => match self.build_location_from_relay() {
- Some(relay_location) => Box::new(future::result(Ok(Some(relay_location)))),
- // Custom relay is set, no location is known
- None => Box::new(future::result(Ok(None))),
- },
+ Disconnecting(..) => Box::new(future::result(Ok(self.build_location_from_relay()))),
Connected { location, .. } => {
let relay_location = location.clone();
Box::new(