summaryrefslogtreecommitdiffhomepage
path: root/test/test-runner/src/sys.rs
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2025-07-09 12:51:42 +0200
committerLinus Färnstrand <linus@mullvad.net>2025-07-09 12:51:42 +0200
commitbef9cb8441e1369865ff345550ebb9c528dd3aca (patch)
treefcac2cea9e6f7c6e270bedbdc5a81b0c0096f555 /test/test-runner/src/sys.rs
parentb21c24e98078145b19b6fc0eb75163e4b4364253 (diff)
parent485d6b1b81ddf9a038dc93c4ed0f000d9aff107b (diff)
downloadmullvadvpn-bef9cb8441e1369865ff345550ebb9c528dd3aca.tar.xz
mullvadvpn-bef9cb8441e1369865ff345550ebb9c528dd3aca.zip
Merge branch 'fix-rust-warnings-prepare-1.88'
Diffstat (limited to 'test/test-runner/src/sys.rs')
-rw-r--r--test/test-runner/src/sys.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/test-runner/src/sys.rs b/test/test-runner/src/sys.rs
index 5f461f9013..024e1153c9 100644
--- a/test/test-runner/src/sys.rs
+++ b/test/test-runner/src/sys.rs
@@ -505,11 +505,11 @@ pub async fn set_daemon_environment(env: HashMap<String, String>) -> Result<(),
let hklm = RegKey::predef(HKEY_LOCAL_MACHINE);
let path = Path::new(MULLVAD_WIN_REGISTRY).join("Environment");
let (registry, _) = hklm.create_subkey(&path).map_err(|error| {
- test_rpc::Error::Registry(format!("Failed to open Mullvad VPN subkey: {}", error))
+ test_rpc::Error::Registry(format!("Failed to open Mullvad VPN subkey: {error}"))
})?;
for (k, v) in env {
registry.set_value(k, &v).map_err(|error| {
- test_rpc::Error::Registry(format!("Failed to set Environment var: {}", error))
+ test_rpc::Error::Registry(format!("Failed to set Environment var: {error}"))
})?;
}
@@ -528,12 +528,12 @@ pub fn get_system_path_var() -> Result<String, test_rpc::Error> {
let key = hklm
.open_subkey("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment")
.map_err(|error| {
- test_rpc::Error::Registry(format!("Failed to open Environment subkey: {}", error))
+ test_rpc::Error::Registry(format!("Failed to open Environment subkey: {error}"))
})?;
let path: String = key
.get_value("Path")
- .map_err(|error| test_rpc::Error::Registry(format!("Failed to get PATH: {}", error)))?;
+ .map_err(|error| test_rpc::Error::Registry(format!("Failed to get PATH: {error}")))?;
Ok(path)
}
@@ -642,7 +642,7 @@ pub async fn get_daemon_environment() -> Result<HashMap<String, String>, test_rp
tokio::task::spawn_blocking(|| -> Result<HashMap<String, String>, test_rpc::Error> {
let hklm = RegKey::predef(HKEY_LOCAL_MACHINE);
let key = hklm.open_subkey(MULLVAD_WIN_REGISTRY).map_err(|error| {
- test_rpc::Error::Registry(format!("Failed to open Mullvad VPN subkey: {}", error))
+ test_rpc::Error::Registry(format!("Failed to open Mullvad VPN subkey: {error}"))
})?;
// The Strings will be quoted (surrounded by ") when read from the registry - we should
@@ -651,10 +651,9 @@ pub async fn get_daemon_environment() -> Result<HashMap<String, String>, test_rp
let env = key
.open_subkey("Environment")
.map_err(|error| {
- test_rpc::Error::Registry(format!(
- "Failed to open Environment subkey: {}",
- error
- ))
+ test_rpc::Error::Registry(
+ format!("Failed to open Environment subkey: {error}",),
+ )
})?
.enum_values()
.filter_map(|x| x.inspect_err(|err| log::trace!("{err}")).ok())