summaryrefslogtreecommitdiffhomepage
path: root/mullvad-setup/src
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2024-07-29 11:46:18 +0200
committerDavid Lönnhager <david.l@mullvad.net>2024-08-27 10:23:29 +0200
commit95ebffa3f13903146ca1c1a0c0345e5ebf1b461b (patch)
tree36ad78830a4682e367e0881f713d233974906569 /mullvad-setup/src
parent3388f5d5591c7bd704ab06839a651b5c46802425 (diff)
downloadmullvadvpn-95ebffa3f13903146ca1c1a0c0345e5ebf1b461b.tar.xz
mullvadvpn-95ebffa3f13903146ca1c1a0c0345e5ebf1b461b.zip
Use std LazyLock instead of once_cell Lazy
Diffstat (limited to 'mullvad-setup/src')
-rw-r--r--mullvad-setup/src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/mullvad-setup/src/main.rs b/mullvad-setup/src/main.rs
index 34155fbb71..f937f04e7e 100644
--- a/mullvad-setup/src/main.rs
+++ b/mullvad-setup/src/main.rs
@@ -1,6 +1,5 @@
use clap::Parser;
-use once_cell::sync::Lazy;
-use std::{path::PathBuf, process, str::FromStr, time::Duration};
+use std::{path::PathBuf, process, str::FromStr, sync::LazyLock, time::Duration};
use mullvad_api::{proxy::ApiConnectionMode, DEVICE_NOT_FOUND};
use mullvad_management_interface::MullvadProxyClient;
@@ -9,8 +8,8 @@ use talpid_core::firewall::{self, Firewall};
use talpid_future::retry::{retry_future, ConstantInterval};
use talpid_types::ErrorExt;
-static APP_VERSION: Lazy<ParsedAppVersion> =
- Lazy::new(|| ParsedAppVersion::from_str(mullvad_version::VERSION).unwrap());
+static APP_VERSION: LazyLock<ParsedAppVersion> =
+ LazyLock::new(|| ParsedAppVersion::from_str(mullvad_version::VERSION).unwrap());
const DEVICE_REMOVAL_STRATEGY: ConstantInterval = ConstantInterval::new(Duration::ZERO, Some(5));