Skip to content

Commit

Permalink
more clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jul 9, 2024
1 parent 322da04 commit 04d1c17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tooling/lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub(crate) fn workspace_package_for_file<'a>(
workspace: &'a Workspace,
file_path: &Path,
) -> Option<&'a Package> {
workspace.members.iter().filter(|package| file_path.starts_with(&package.root_dir)).next()
workspace.members.iter().find(|package| file_path.starts_with(&package.root_dir))
}

pub(crate) fn prepare_package<'file_manager, 'parsed_files>(
Expand Down
2 changes: 1 addition & 1 deletion tooling/lsp/src/requests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ pub(crate) fn find_all_references(
.filter_map(|location| to_lsp_location(files, location.file, location.span))
.collect()
})
.unwrap_or(vec![])
.unwrap_or_default()
}

#[cfg(test)]
Expand Down

0 comments on commit 04d1c17

Please sign in to comment.