Skip to content

Commit 5dd1852

Browse files
Concelareextrawurst
authored andcommitted
Fixed:
- Cargo clippy errors Updated: - Ran cargo clippy --fix - Ran cargo fmt
1 parent 02dfae7 commit 5dd1852

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

src/components/textinput.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ mod tests {
756756
if let Some(ta) = &mut comp.textarea {
757757
let txt = ta.lines();
758758
assert_eq!(txt[0].len(), 1);
759-
assert_eq!(txt[0].as_bytes()[0], 'a' as u8);
759+
assert_eq!(txt[0].as_bytes()[0], b'a');
760760
}
761761
}
762762

src/components/utils/filetree.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ mod tests {
404404
)
405405
.unwrap();
406406

407-
assert_eq!(res.multiple_items_at_path(0), false);
408-
assert_eq!(res.multiple_items_at_path(1), false);
409-
assert_eq!(res.multiple_items_at_path(2), true);
407+
assert!(!res.multiple_items_at_path(0));
408+
assert!(!res.multiple_items_at_path(1));
409+
assert!(res.multiple_items_at_path(2));
410410
}
411411

412412
#[test]

src/components/utils/statustree.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,7 @@ mod tests {
509509
false, //
510510
]
511511
);
512-
assert_eq!(
513-
res.is_visible_index(res.selection.unwrap()),
514-
true
515-
);
512+
assert!(res.is_visible_index(res.selection.unwrap()));
516513
assert_eq!(res.selection, Some(0));
517514
}
518515

src/popups/blame_file.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ impl Component for BlameFilePopup {
197197
let has_result = self
198198
.blame
199199
.as_ref()
200-
.map(|blame| blame.result().is_some())
201-
.unwrap_or_default();
200+
.is_some_and(|blame| blame.result().is_some());
202201
if self.is_visible() || force_all {
203202
out.push(
204203
CommandInfo::new(

src/ui/reflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ mod test {
445445
"mnopab cdefghi j",
446446
"klmno",
447447
]
448-
)
448+
);
449449
}
450450

451451
#[test]

0 commit comments

Comments
 (0)