summaryrefslogtreecommitdiffhomepage
path: root/mullvad-api/src/proxy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mullvad-api/src/proxy.rs')
-rw-r--r--mullvad-api/src/proxy.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/mullvad-api/src/proxy.rs b/mullvad-api/src/proxy.rs
index 4ad842ee85..ab05e25021 100644
--- a/mullvad-api/src/proxy.rs
+++ b/mullvad-api/src/proxy.rs
@@ -154,13 +154,13 @@ impl ApiConnectionMode {
/// Attempts to remove `CURRENT_CONFIG_FILENAME`, if it exists.
pub async fn try_delete_cache(cache_dir: &Path) {
let path = cache_dir.join(CURRENT_CONFIG_FILENAME);
- if let Err(err) = fs::remove_file(path).await {
- if err.kind() != std::io::ErrorKind::NotFound {
- log::error!(
- "{}",
- err.display_chain_with_msg("Failed to remove old API config")
- );
- }
+ if let Err(err) = fs::remove_file(path).await
+ && err.kind() != std::io::ErrorKind::NotFound
+ {
+ log::error!(
+ "{}",
+ err.display_chain_with_msg("Failed to remove old API config")
+ );
}
}