- Cargo clippy errors

Updated:
- Ran cargo clippy --fix
- Ran cargo fmt
This commit is contained in:
Concelare
2024-03-21 23:01:02 -07:00
committed by extrawurst
parent 02dfae7bd4
commit 5dd1852dd3
5 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -756,7 +756,7 @@ mod tests {
if let Some(ta) = &mut comp.textarea {
let txt = ta.lines();
assert_eq!(txt[0].len(), 1);
assert_eq!(txt[0].as_bytes()[0], 'a' as u8);
assert_eq!(txt[0].as_bytes()[0], b'a');
}
}
+3 -3
View File
@@ -404,9 +404,9 @@ mod tests {
)
.unwrap();
assert_eq!(res.multiple_items_at_path(0), false);
assert_eq!(res.multiple_items_at_path(1), false);
assert_eq!(res.multiple_items_at_path(2), true);
assert!(!res.multiple_items_at_path(0));
assert!(!res.multiple_items_at_path(1));
assert!(res.multiple_items_at_path(2));
}
#[test]
+1 -4
View File
@@ -509,10 +509,7 @@ mod tests {
false, //
]
);
assert_eq!(
res.is_visible_index(res.selection.unwrap()),
true
);
assert!(res.is_visible_index(res.selection.unwrap()));
assert_eq!(res.selection, Some(0));
}
+1 -2
View File
@@ -197,8 +197,7 @@ impl Component for BlameFilePopup {
let has_result = self
.blame
.as_ref()
.map(|blame| blame.result().is_some())
.unwrap_or_default();
.is_some_and(|blame| blame.result().is_some());
if self.is_visible() || force_all {
out.push(
CommandInfo::new(
+1 -1
View File
@@ -445,7 +445,7 @@ mod test {
"mnopab cdefghi j",
"klmno",
]
)
);
}
#[test]