From c6dec379f2a0c9f585c09cb74a3a8cbda5b8718c Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 30 Dec 2022 09:42:50 +0100 Subject: [PATCH] clippy nightly fixes --- asyncgit/src/sync/tree.rs | 4 ++-- src/tabs/stashing.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asyncgit/src/sync/tree.rs b/asyncgit/src/sync/tree.rs index 9a2e7e30..b63332f2 100644 --- a/asyncgit/src/sync/tree.rs +++ b/asyncgit/src/sync/tree.rs @@ -48,8 +48,8 @@ fn sort_file_list(files: &mut [TreeFile]) { // applies topologically order on paths sorting fn path_cmp(a: &Path, b: &Path) -> Ordering { - let mut comp_a = a.components().into_iter().peekable(); - let mut comp_b = b.components().into_iter().peekable(); + let mut comp_a = a.components().peekable(); + let mut comp_b = b.components().peekable(); loop { let a = comp_a.next(); diff --git a/src/tabs/stashing.rs b/src/tabs/stashing.rs index de8f52a9..4d50d8d2 100644 --- a/src/tabs/stashing.rs +++ b/src/tabs/stashing.rs @@ -128,9 +128,9 @@ impl Stashing { Spans::from(vec![ bracket_open, if self.options.keep_index { - option_on.clone() + option_on } else { - option_off.clone() + option_off }, bracket_close, Span::raw(Cow::from(" keep index")),