From 0100b754f401ca82ac18a543a728acb6f6e55757 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 18 Dec 2022 08:50:52 +0100 Subject: [PATCH 1/2] Fix `needless_borrow` lints --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bf4fca8..178d239 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 { From 65dc0205d029d7fa92f5195c7e5bab36f285b862 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 18 Dec 2022 08:52:05 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66620c7..b8c86ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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