mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
Fix clippy issues on nightly (#2852)
This fixes issues found by `clippy 0.1.95 (f134bbc78d 2026-01-24)`.
This commit is contained in:
parent
13d75df6cd
commit
b65de976e6
7 changed files with 7 additions and 9 deletions
|
|
@ -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 {
|
||||
///
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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())? {
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Reference in a new issue