Skip to content

Commit 8bff603

Browse files
authored
Address clippy issues on nightly (#2707)
1 parent fd46b9a commit 8bff603

File tree

6 files changed

+5
-7
lines changed

6 files changed

+5
-7
lines changed

src/cmdbar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl CommandBar {
104104
line_width += entry_w + 1;
105105

106106
self.draw_list.push(DrawListEntry::Command(Command {
107-
txt: c.text.name.to_string(),
107+
txt: c.text.name.clone(),
108108
enabled: c.enabled,
109109
line: lines.saturating_sub(1) as usize,
110110
}));

src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@
4444
clippy::unwrap_used,
4545
clippy::filetype_is_file,
4646
clippy::cargo,
47-
clippy::unwrap_used,
4847
clippy::panic,
4948
clippy::match_like_matches_macro
5049
)]
51-
#![allow(clippy::module_name_repetitions)]
5250
#![allow(
5351
clippy::multiple_crate_versions,
5452
clippy::bool_to_int_with_if,

src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl Options {
133133

134134
index = entries.saturating_sub(1) - index;
135135

136-
Some(self.data.commit_msgs[index].to_string())
136+
Some(self.data.commit_msgs[index].clone())
137137
}
138138
}
139139

src/popups/branchlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ impl BranchListPopup {
557557
theme.commit_hash(selected),
558558
);
559559
let span_msg = Span::styled(
560-
commit_message.to_string(),
560+
commit_message.clone(),
561561
theme.text(true, selected),
562562
);
563563
let span_name = Span::styled(

src/popups/file_revlog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl FileRevlogPopup {
171171
{
172172
if params == diff_params {
173173
self.diff.update(
174-
open_request.file_path.to_string(),
174+
open_request.file_path.clone(),
175175
false,
176176
last,
177177
);

src/popups/submodules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ impl SubmodulesListPopup {
449449
theme.text(false, false),
450450
)]),
451451
Line::from(vec![Span::styled(
452-
self.repo_path.to_string(),
452+
self.repo_path.clone(),
453453
theme.text(true, false),
454454
)]),
455455
Line::from(vec![Span::styled(

0 commit comments

Comments
 (0)