diff options
| author | Sebastian Holmin <sebastian.holmin@mullvad.net> | 2024-01-04 05:46:39 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-01-05 17:02:12 +0100 |
| commit | 62df52bb1e7b81d44e0f7bd73ec2aa5882311db9 (patch) | |
| tree | 8429fbe124f557009b119b6f1ba302958165ecec | |
| parent | 616d064f343a4a3703f68d58a0a4baa56e46832c (diff) | |
| download | mullvadvpn-62df52bb1e7b81d44e0f7bd73ec2aa5882311db9.tar.xz mullvadvpn-62df52bb1e7b81d44e0f7bd73ec2aa5882311db9.zip | |
Run `cargo clippy --all-targets --fix`
These lints where missed because the problems were inside tests.
Note that "targets" does not refer to OS/architectures.
```
> cargo build --help
...
Target Selection:
--lib Build only this package's library
--bins Build all binaries
--bin [<NAME>] Build only the specified binary
--examples Build all examples
--example [<NAME>] Build only the specified example
--tests Build all test targets
--test [<NAME>] Build only the specified test target
--benches Build all bench targets
--bench [<NAME>] Build only the specified bench target
--all-targets Build all targets
```
| -rw-r--r-- | mullvad-daemon/src/migrations/v7.rs | 2 | ||||
| -rw-r--r-- | mullvad-daemon/src/settings/mod.rs | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/mullvad-daemon/src/migrations/v7.rs b/mullvad-daemon/src/migrations/v7.rs index 1453685e57..4baf49b571 100644 --- a/mullvad-daemon/src/migrations/v7.rs +++ b/mullvad-daemon/src/migrations/v7.rs @@ -80,7 +80,6 @@ pub struct ShadowsocksProxySettings { /// - shadowsocks.peer to shadowsocks.endpoint /// - socks5_remote.authentication to socks5_remote.auth /// - socks5_remote.peer to socks5_remote.endpoint -/// pub fn migrate(settings: &mut serde_json::Value) -> Result<()> { if !version_matches(settings) { return Ok(()); @@ -254,7 +253,6 @@ mod test { use crate::migrations::v7::{migrate_api_access_settings, migrate_bridge_settings}; use super::{migrate, version_matches}; - use serde_json; pub const V7_SETTINGS: &str = r#" { diff --git a/mullvad-daemon/src/settings/mod.rs b/mullvad-daemon/src/settings/mod.rs index 8a63b5c5a6..47a2edc989 100644 --- a/mullvad-daemon/src/settings/mod.rs +++ b/mullvad-daemon/src/settings/mod.rs @@ -528,7 +528,7 @@ mod test { ); assert!( - settings.block_when_disconnected == false, + !settings.block_when_disconnected, "The daemon should not block the internet if settings are missing" ); } |
