From c0f164fc4e237c9e68bd396b821825fd66aac47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20R=C3=BC=C3=9Fler?= Date: Fri, 29 Aug 2025 14:14:15 +0200 Subject: [PATCH] Address clippy issues on nightly --- src/cmdbar.rs | 2 +- src/main.rs | 2 -- src/options.rs | 2 +- src/popups/branchlist.rs | 2 +- src/popups/file_revlog.rs | 2 +- src/popups/submodules.rs | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/cmdbar.rs b/src/cmdbar.rs index 790d0f09e1..4194777f2c 100644 --- a/src/cmdbar.rs +++ b/src/cmdbar.rs @@ -104,7 +104,7 @@ impl CommandBar { line_width += entry_w + 1; self.draw_list.push(DrawListEntry::Command(Command { - txt: c.text.name.to_string(), + txt: c.text.name.clone(), enabled: c.enabled, line: lines.saturating_sub(1) as usize, })); diff --git a/src/main.rs b/src/main.rs index 50d7a98b93..de1e6afce1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,11 +44,9 @@ clippy::unwrap_used, clippy::filetype_is_file, clippy::cargo, - clippy::unwrap_used, clippy::panic, clippy::match_like_matches_macro )] -#![allow(clippy::module_name_repetitions)] #![allow( clippy::multiple_crate_versions, clippy::bool_to_int_with_if, diff --git a/src/options.rs b/src/options.rs index 0fafe64151..38e7ac1bfe 100644 --- a/src/options.rs +++ b/src/options.rs @@ -133,7 +133,7 @@ impl Options { index = entries.saturating_sub(1) - index; - Some(self.data.commit_msgs[index].to_string()) + Some(self.data.commit_msgs[index].clone()) } } diff --git a/src/popups/branchlist.rs b/src/popups/branchlist.rs index 9eb5c57e09..2fe8690539 100644 --- a/src/popups/branchlist.rs +++ b/src/popups/branchlist.rs @@ -557,7 +557,7 @@ impl BranchListPopup { theme.commit_hash(selected), ); let span_msg = Span::styled( - commit_message.to_string(), + commit_message.clone(), theme.text(true, selected), ); let span_name = Span::styled( diff --git a/src/popups/file_revlog.rs b/src/popups/file_revlog.rs index 62acf1c7e5..3a923c5535 100644 --- a/src/popups/file_revlog.rs +++ b/src/popups/file_revlog.rs @@ -171,7 +171,7 @@ impl FileRevlogPopup { { if params == diff_params { self.diff.update( - open_request.file_path.to_string(), + open_request.file_path.clone(), false, last, ); diff --git a/src/popups/submodules.rs b/src/popups/submodules.rs index 4ac1857e36..b73a9abe86 100644 --- a/src/popups/submodules.rs +++ b/src/popups/submodules.rs @@ -449,7 +449,7 @@ impl SubmodulesListPopup { theme.text(false, false), )]), Line::from(vec![Span::styled( - self.repo_path.to_string(), + self.repo_path.clone(), theme.text(true, false), )]), Line::from(vec![Span::styled(