From 8294bc8ceace02af154cbe1df1682666c5cb343a Mon Sep 17 00:00:00 2001 From: spearzificial <342299391+spearzificial@users.noreply.github.com> Date: Wed, 21 Oct 2026 17:45:10 +0530 Subject: [PATCH] fix(updater): restructure the release selection to satisfy clippy The two branches that returned the candidate were identical, which clippy flags as if_same_then_else. The condition is now a single boolean. --- src/updater.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/updater.rs b/src/updater.rs index e895d6a..e3b6e03 100644 --- a/src/updater.rs +++ b/src/updater.rs @@ -64,15 +64,10 @@ fn pick_newer_release(current: Option, candidate: ReleaseInfo) -> R match current { None => candidate, Some(current) => { - if is_newer(&candidate.version, ¤t.version) { - candidate - } else if candidate.version == current.version - && candidate.assets.len() > current.assets.len() - { - candidate - } else { - current - } + let candidate_wins = is_newer(&candidate.version, ¤t.version) + || (candidate.version == current.version + && candidate.assets.len() > current.assets.len()); + if candidate_wins { candidate } else { current } } } }