Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion asyncgit/src/revlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
///
Expand Down
2 changes: 1 addition & 1 deletion asyncgit/src/sync/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
3 changes: 1 addition & 2 deletions src/popups/branchlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/popups/reset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down
3 changes: 1 addition & 2 deletions src/popups/taglist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())? {
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Loading