Merge pull request #526 from vbrandl/fix/clippy-lints

Fix `needless_borrow` lints
This commit is contained in:
Valentin Brandl 2022-12-18 08:58:07 +01:00 committed by GitHub
commit dd16ed862b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -5,11 +5,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixes
* Fix clippy lint `needless_borrow` ([#526])
### Dependency Updates
* Updated [`bytes`](https://github.com/tokio-rs/bytes) from 1.2.1 to 1.3.0 ([#519])
[#519]: https://github.com/vbrandl/hoc/pull/519
[#526]: https://github.com/vbrandl/hoc/pull/526
## [0.27.0] 2022-10-21

View File

@ -210,14 +210,14 @@ where
info!("Deleting cache and repository");
let cache_dir = format!("{}/{}.json", &state.cache(), repo);
let repo_dir = format!("{}/{}", &state.repos(), repo);
std::fs::remove_file(&cache_dir).or_else(|e| {
std::fs::remove_file(cache_dir).or_else(|e| {
if e.kind() == io::ErrorKind::NotFound {
Ok(())
} else {
Err(e)
}
})?;
std::fs::remove_dir_all(&repo_dir).or_else(|e| {
std::fs::remove_dir_all(repo_dir).or_else(|e| {
if e.kind() == io::ErrorKind::NotFound {
Ok(())
} else {