From 9dcfd15e99a23f07212710196b6afdf7aab9282c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 22 Feb 2025 19:24:47 +0100 Subject: [PATCH] thanks clippy --- gix-ref/src/store/file/find.rs | 12 ++++++------ gix-traverse/src/commit/simple.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gix-ref/src/store/file/find.rs b/gix-ref/src/store/file/find.rs index 536810403d1..3554f0c90f0 100644 --- a/gix-ref/src/store/file/find.rs +++ b/gix-ref/src/store/file/find.rs @@ -234,17 +234,17 @@ impl file::Store { } Tag | LocalBranch | RemoteBranch | Note => (commondir.into(), name), MainRef | MainPseudoRef => (commondir.into(), sn), - LinkedRef { name: worktree_name } => sn - .category() - .is_some_and(|cat| cat.is_worktree_private()) - .then(|| { + LinkedRef { name: worktree_name } => { + if sn.category().is_some_and(|cat| cat.is_worktree_private()) { if is_reflog { (linked_git_dir(worktree_name).into(), sn) } else { (commondir.into(), name) } - }) - .unwrap_or((commondir.into(), sn)), + } else { + (commondir.into(), sn) + } + } PseudoRef | Bisect | Rewritten | WorktreePrivate => (self.git_dir.as_path().into(), name), } }) diff --git a/gix-traverse/src/commit/simple.rs b/gix-traverse/src/commit/simple.rs index 79de7f0d376..5bb3c2cd0ec 100644 --- a/gix-traverse/src/commit/simple.rs +++ b/gix-traverse/src/commit/simple.rs @@ -222,8 +222,8 @@ mod init { /// Create a new instance with commit filtering enabled. /// /// * `find` - a way to lookup new object data during traversal by their `ObjectId`, writing their data into buffer and returning - /// an iterator over commit tokens if the object is present and is a commit. Caching should be implemented within this function - /// as needed. + /// an iterator over commit tokens if the object is present and is a commit. Caching should be implemented within this function + /// as needed. /// * `tips` /// * the starting points of the iteration, usually commits /// * each commit they lead to will only be returned once, including the tip that started it