- Cargo clippy errors

Updated:
- Ran cargo clippy --fix
- Ran cargo fmt
This commit is contained in:
Concelare 2024-03-22 00:33:14 +00:00 committed by extrawurst
parent 02dfae7bd4
commit 5dd1852dd3
5 changed files with 7 additions and 11 deletions

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');
}
}

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]

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));
}

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(

View file

@ -445,7 +445,7 @@ mod test {
"mnopab cdefghi j",
"klmno",
]
)
);
}
#[test]