Skip to content

Commit 1061fcc

Browse files
committed
clippy
1 parent f087732 commit 1061fcc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ fn selection_marker() -> &'static str {
470470
}
471471
}
472472

473+
#[allow(clippy::too_many_arguments)]
473474
fn recur_tree(
474475
git_repo: &GitRepo,
475476
branch: &Branch,
@@ -487,7 +488,7 @@ fn recur_tree(
487488
let is_dimmed = if display_authors.is_empty() {
488489
false
489490
} else {
490-
pr_author.map_or(false, |author| {
491+
pr_author.is_some_and(|author| {
491492
!display_authors.contains(&author.to_string())
492493
})
493494
};

src/sync.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,14 +938,13 @@ fn compute_sync_plan(
938938

939939
// Check if local branch is ancestor of origin/<branch>
940940
let remote_ref = format!("{}/{}", DEFAULT_REMOTE, branch_name);
941-
if git_repo.ref_exists(&remote_ref) {
942-
if let Ok(true) = git_repo.is_ancestor(branch_name, &remote_ref) {
941+
if git_repo.ref_exists(&remote_ref)
942+
&& let Ok(true) = git_repo.is_ancestor(branch_name, &remote_ref) {
943943
local_changes.push(LocalChange::DeleteLocalBranch {
944944
name: branch_name.clone(),
945945
reason: DeleteReason::AncestorOfRemote,
946946
});
947947
}
948-
}
949948
}
950949
}
951950

0 commit comments

Comments
 (0)