summaryrefslogtreecommitdiffhomepage
path: root/mullvad-setup
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2022-05-11 12:09:56 +0200
committerDavid Lönnhager <david.l@mullvad.net>2022-05-12 15:02:31 +0200
commit34ff035d07a086d2bad26bfadfbda93b098806ff (patch)
tree444ffe398cdf64d2219a3efc1c41bf1ff49d7867 /mullvad-setup
parent61c0bc8a3081fd03b55c1bd9742c68921cbe87ba (diff)
downloadmullvadvpn-34ff035d07a086d2bad26bfadfbda93b098806ff.tar.xz
mullvadvpn-34ff035d07a086d2bad26bfadfbda93b098806ff.zip
Distinguish between logged-out and revoked device states
Diffstat (limited to 'mullvad-setup')
-rw-r--r--mullvad-setup/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mullvad-setup/src/main.rs b/mullvad-setup/src/main.rs
index 15a0c7dd6d..b257d92080 100644
--- a/mullvad-setup/src/main.rs
+++ b/mullvad-setup/src/main.rs
@@ -164,10 +164,10 @@ async fn reset_firewall() -> Result<(), Error> {
async fn remove_device() -> Result<(), Error> {
let (cache_path, settings_path) = get_paths()?;
- let (cacher, data) = mullvad_daemon::device::DeviceCacher::new(&settings_path)
+ let (cacher, state) = mullvad_daemon::device::DeviceCacher::new(&settings_path)
.await
.map_err(Error::ReadDeviceCacheError)?;
- if let Some(device) = data {
+ if let Some(device) = state.into_device() {
let api_runtime = mullvad_api::Runtime::with_cache(&cache_path, false)
.await
.map_err(Error::RpcInitializationError)?;