diff options
| author | jonathan <jonathan@mullvad.net> | 2022-06-10 10:22:44 +0200 |
|---|---|---|
| committer | jonathan <jonathan@mullvad.net> | 2022-06-13 09:32:53 +0200 |
| commit | 08b60d4ac77d5f58649930ccd0770e490b732864 (patch) | |
| tree | 06c6940021736480858b8350edb04675d564da4b /mullvad-api/src/address_cache.rs | |
| parent | 1065db6ec3e2e0485bd39a5730942071f5cdbaf4 (diff) | |
| download | mullvadvpn-08b60d4ac77d5f58649930ccd0770e490b732864.tar.xz mullvadvpn-08b60d4ac77d5f58649930ccd0770e490b732864.zip | |
Perform a clippy --fix
This is a giant commit which performs only a clippy --fix.
Auditing can happen in two ways, either by reading every line or by
running a `cargo clippy --fix` on the previous commit and make sure that
the result is the same.
Diffstat (limited to 'mullvad-api/src/address_cache.rs')
| -rw-r--r-- | mullvad-api/src/address_cache.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mullvad-api/src/address_cache.rs b/mullvad-api/src/address_cache.rs index 3b6fcba074..92b7b6054f 100644 --- a/mullvad-api/src/address_cache.rs +++ b/mullvad-api/src/address_cache.rs @@ -49,7 +49,7 @@ impl AddressCache { let address_cache = Self { inner: Arc::new(Mutex::new(cache)), - write_path: write_path.map(|cache| Arc::from(cache)), + write_path: write_path.map(Arc::from), }; Ok(address_cache) } @@ -109,7 +109,7 @@ impl AddressCacheInner { async fn read_address_file(path: &Path) -> Result<SocketAddr, Error> { let mut file = fs::File::open(path) .await - .map_err(|error| Error::OpenAddressCache(error))?; + .map_err(Error::OpenAddressCache)?; let mut address = String::new(); file.read_to_string(&mut address) .await |
