lib/bin: Fix clippy warnings

This commit is contained in:
Erik Kundt
2024-11-29 12:07:50 +01:00
parent f6fe140aba
commit 239b7a0343
9 changed files with 130 additions and 164 deletions
+1 -1
View File
@@ -798,7 +798,7 @@ impl<'a> Widget for TextView<'a> {
frame.render_stateful_widget(scroller, scroller_area, &mut scroller_state);
frame.render_widget(
Paragraph::new(self.text.clone()).scroll((self.cursor.x as u16, self.cursor.y as u16)),
Paragraph::new(self.text.clone()).scroll((self.cursor.x, self.cursor.y)),
text_area,
);
+5 -5
View File
@@ -51,10 +51,10 @@ fn another_function() {
Is this needed?
──────────────────────────────────────"#
.to_string();
let comment = comment.lines().into_iter().collect::<Vec<_>>();
let comment = comment.lines().collect::<Vec<_>>();
let merged = LineMerger::merge(
diff.lines().into_iter().collect(),
diff.lines().collect(),
HashMap::from([(3_usize, vec![comment])]),
1,
);
@@ -98,10 +98,10 @@ fn another_function() {
Is this needed?
──────────────────────────────────────"#
.to_string();
let comment = comment.lines().into_iter().collect::<Vec<_>>();
let comment = comment.lines().collect::<Vec<_>>();
let merged = LineMerger::merge(
diff.lines().into_iter().collect(),
diff.lines().collect(),
HashMap::from([(104_usize, vec![comment])]),
100,
);
@@ -132,7 +132,7 @@ fn another_function() {
let mut actual = String::new();
for (idx, line) in lines.iter().enumerate() {
if idx == lines.len() - 1 {
actual.push_str(&format!("{}", line));
actual.push_str(&line.to_string());
} else {
actual.push_str(&format!("{}\n", line));
}