Fix clippy issues on nightly (#2852)

This fixes issues found by `clippy 0.1.95 (f134bbc78d 2026-01-24)`.
This commit is contained in:
Christoph Rüßler 2026-01-25 22:20:23 +01:00 committed by GitHub
parent 13d75df6cd
commit b65de976e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 7 additions and 9 deletions

View file

@ -49,7 +49,7 @@ pub struct AsyncLog {
static LIMIT_COUNT: usize = 3000;
static SLEEP_FOREGROUND: Duration = Duration::from_millis(2);
static SLEEP_BACKGROUND: Duration = Duration::from_millis(1000);
static SLEEP_BACKGROUND: Duration = Duration::from_secs(1);
impl AsyncLog {
///

View file

@ -141,7 +141,7 @@ pub fn get_tags_with_metadata(
})
.collect();
tags.sort_unstable_by(|a, b| b.time.cmp(&a.time));
tags.sort_unstable_by_key(|b| std::cmp::Reverse(b.time));
Ok(tags)
}

View file

@ -12,7 +12,7 @@ use std::{
};
static FAST_POLL_DURATION: Duration = Duration::from_millis(100);
static SLOW_POLL_DURATION: Duration = Duration::from_millis(10000);
static SLOW_POLL_DURATION: Duration = Duration::from_secs(10);
///
#[derive(Clone, Copy, Debug)]

View file

@ -307,8 +307,7 @@ impl BranchListPopup {
if self.visible {
self.has_remotes =
get_branches_info(&self.repo.borrow(), false)
.map(|branches| !branches.is_empty())
.unwrap_or(false);
.is_ok_and(|branches| !branches.is_empty());
}
}

View file

@ -120,7 +120,7 @@ impl ResetPopup {
///
#[allow(clippy::unnecessary_wraps)]
pub fn update(&mut self) -> Result<()> {
self.git_branch_name.lookup().map(Some).unwrap_or(None);
self.git_branch_name.lookup().ok();
Ok(())
}

View file

@ -312,8 +312,7 @@ impl TagListPopup {
self.has_remotes =
sync::get_branches_info(&self.repo.borrow(), false)
.map(|branches| !branches.is_empty())
.unwrap_or(false);
.is_ok_and(|branches| !branches.is_empty());
let basic_credential = if self.has_remotes {
if need_username_password(&self.repo.borrow())? {

View file

@ -382,7 +382,7 @@ impl Status {
///
pub fn update(&mut self) -> Result<()> {
self.git_branch_name.lookup().map(Some).unwrap_or(None);
let _ = self.git_branch_name.lookup().ok();
if self.is_visible() {
let config =