Fixed **many** clippy lints, and one bug.

This commit is contained in:
Mark Tomlin 2023-12-25 13:06:02 -05:00 committed by Jeremy Soller
parent d289670def
commit aecb80eaed
6 changed files with 155 additions and 201 deletions

View file

@ -54,13 +54,10 @@ impl ProjectSearchResult {
}
};
match entry.file_type() {
Some(file_type) => {
if file_type.is_dir() {
continue;
}
if let Some(file_type) = entry.file_type() {
if file_type.is_dir() {
continue;
}
None => {}
}
let entry_path = entry.path();
@ -68,7 +65,7 @@ impl ProjectSearchResult {
let mut lines = Vec::new();
match searcher.search_path(
&matcher,
&entry_path,
entry_path,
UTF8(|number_u64, text| {
match usize::try_from(number_u64) {
Ok(number) => match matcher.find(text.as_bytes()) {