diff options
| author | Jonathan <jonathan@mullvad.net> | 2022-06-13 10:49:46 +0200 |
|---|---|---|
| committer | Jonathan <jonathan@mullvad.net> | 2022-06-21 14:31:40 +0200 |
| commit | d3da8745c8ff9e66d6698d8a239b8139dbe8abfe (patch) | |
| tree | 528a15026535b01bc3324892be783797aa64bbe4 /mullvad-daemon/src/device | |
| parent | b6b80b9ffe6521a78ea6b2cdfd0e6965e67479fd (diff) | |
| download | mullvadvpn-d3da8745c8ff9e66d6698d8a239b8139dbe8abfe.tar.xz mullvadvpn-d3da8745c8ff9e66d6698d8a239b8139dbe8abfe.zip | |
Fix the large majority of clippy warnings
This commit fixes most of the remaining clippy warnings in the codebase.
These warnings were the more semantically difficult ones to fix.
There are some warnings that remain from the rebase that will be fixed
in the upcoming PR.
Diffstat (limited to 'mullvad-daemon/src/device')
| -rw-r--r-- | mullvad-daemon/src/device/api.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mullvad-daemon/src/device/api.rs b/mullvad-daemon/src/device/api.rs index cee0186987..6e00b669ca 100644 --- a/mullvad-daemon/src/device/api.rs +++ b/mullvad-daemon/src/device/api.rs @@ -35,10 +35,10 @@ impl CurrentApiCall { } pub fn is_validating(&self) -> bool { - match &self.current_call { - Some(Call::Validation(_)) | Some(Call::OneshotKeyRotation(_)) => true, - _ => false, - } + matches!( + &self.current_call, + Some(Call::Validation(_)) | Some(Call::OneshotKeyRotation(_)) + ) } pub fn is_running_timed_totation(&self) -> bool { @@ -51,10 +51,7 @@ impl CurrentApiCall { pub fn is_logging_in(&self) -> bool { use Call::*; - match &self.current_call { - Some(Login(..)) => true, - _ => false, - } + matches!(&self.current_call, Some(Login(..))) } } |
