summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2023-11-13 15:18:52 +0100
committerMarkus Pettersson <markus.pettersson@mullvad.net>2023-11-13 15:18:52 +0100
commit24ce320d340269b975b287b3c55d970d1673abd1 (patch)
treecf805f7b2c680855c3cefb07fd5cacb05b79f118
parent730b7cfad3a908deec63b5d830733657762f1651 (diff)
parent1a6f35aff23e7affe6ada0e80220ddc854d4a320 (diff)
downloadmullvadvpn-24ce320d340269b975b287b3c55d970d1673abd1.tar.xz
mullvadvpn-24ce320d340269b975b287b3c55d970d1673abd1.zip
Merge branch 'clippy_lints_in_tests'
-rw-r--r--mullvad-daemon/src/migrations/v1.rs4
-rw-r--r--mullvad-daemon/src/migrations/v2.rs2
-rw-r--r--mullvad-daemon/src/migrations/v3.rs2
-rw-r--r--mullvad-daemon/src/migrations/v4.rs2
-rw-r--r--mullvad-daemon/src/migrations/v5.rs2
-rw-r--r--mullvad-daemon/src/migrations/v6.rs2
-rw-r--r--talpid-wireguard/src/wireguard_nt.rs2
7 files changed, 8 insertions, 8 deletions
diff --git a/mullvad-daemon/src/migrations/v1.rs b/mullvad-daemon/src/migrations/v1.rs
index 9c18e390b4..c3013c7b28 100644
--- a/mullvad-daemon/src/migrations/v1.rs
+++ b/mullvad-daemon/src/migrations/v1.rs
@@ -205,7 +205,7 @@ mod test {
fn test_v1_migration() {
let mut old_settings = serde_json::from_str(V1_SETTINGS).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V2_SETTINGS).unwrap();
@@ -217,7 +217,7 @@ mod test {
fn test_v1_2019v3_migration() {
let mut old_settings = serde_json::from_str(V1_SETTINGS_2019V3).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V2_SETTINGS).unwrap();
diff --git a/mullvad-daemon/src/migrations/v2.rs b/mullvad-daemon/src/migrations/v2.rs
index 2917abb6dc..0ea4cdce9f 100644
--- a/mullvad-daemon/src/migrations/v2.rs
+++ b/mullvad-daemon/src/migrations/v2.rs
@@ -181,7 +181,7 @@ mod test {
fn test_v2_migration() {
let mut old_settings = serde_json::from_str(V2_SETTINGS).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V3_SETTINGS).unwrap();
diff --git a/mullvad-daemon/src/migrations/v3.rs b/mullvad-daemon/src/migrations/v3.rs
index 78ee01dab6..f59bc57b98 100644
--- a/mullvad-daemon/src/migrations/v3.rs
+++ b/mullvad-daemon/src/migrations/v3.rs
@@ -219,7 +219,7 @@ mod test {
fn test_v3_migration() {
let mut old_settings = serde_json::from_str(V3_SETTINGS).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V4_SETTINGS).unwrap();
diff --git a/mullvad-daemon/src/migrations/v4.rs b/mullvad-daemon/src/migrations/v4.rs
index 82d238ae19..cd11056d4a 100644
--- a/mullvad-daemon/src/migrations/v4.rs
+++ b/mullvad-daemon/src/migrations/v4.rs
@@ -287,7 +287,7 @@ mod test {
fn test_v4_migration() {
let mut old_settings = serde_json::from_str(V4_SETTINGS).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V5_SETTINGS).unwrap();
diff --git a/mullvad-daemon/src/migrations/v5.rs b/mullvad-daemon/src/migrations/v5.rs
index c615927422..351b427a85 100644
--- a/mullvad-daemon/src/migrations/v5.rs
+++ b/mullvad-daemon/src/migrations/v5.rs
@@ -335,7 +335,7 @@ mod test {
async fn test_v5_to_v6_migration() {
let mut old_settings = serde_json::from_str(V5_SETTINGS).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V6_SETTINGS).unwrap();
diff --git a/mullvad-daemon/src/migrations/v6.rs b/mullvad-daemon/src/migrations/v6.rs
index 3bceac9252..ff71dbce63 100644
--- a/mullvad-daemon/src/migrations/v6.rs
+++ b/mullvad-daemon/src/migrations/v6.rs
@@ -291,7 +291,7 @@ mod test {
fn test_v6_to_v7_migration() {
let mut old_settings = serde_json::from_str(V6_SETTINGS).unwrap();
- assert!(version_matches(&mut old_settings));
+ assert!(version_matches(&old_settings));
migrate(&mut old_settings).unwrap();
let new_settings: serde_json::Value = serde_json::from_str(V7_SETTINGS).unwrap();
diff --git a/talpid-wireguard/src/wireguard_nt.rs b/talpid-wireguard/src/wireguard_nt.rs
index daa7da65c8..588d5a7f82 100644
--- a/talpid-wireguard/src/wireguard_nt.rs
+++ b/talpid-wireguard/src/wireguard_nt.rs
@@ -997,7 +997,7 @@ mod tests {
}
static WG_PRIVATE_KEY: Lazy<wireguard::PrivateKey> =
- Lazy::new(|| wireguard::PrivateKey::new_from_random());
+ Lazy::new(wireguard::PrivateKey::new_from_random);
static WG_PUBLIC_KEY: Lazy<wireguard::PublicKey> =
Lazy::new(|| wireguard::PrivateKey::new_from_random().public_key());
static WG_CONFIG: Lazy<Config> = Lazy::new(|| Config {