Skip to content

Commit

Permalink
Replaced filter_map with flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
ontley committed Nov 2, 2023
1 parent dfcd842 commit 3d90dea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helix-lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,9 @@ fn start_client(
Ok(glob) => {
if !root_path
.read_dir()?
.filter_map(|e| e.ok())
.map(|e| e.file_name())
.any(|filename| glob.is_match(filename))
.flatten()
.map(|entry| entry.file_name())
.any(|entry| glob.is_match(entry))
{
return Ok(None);
}
Expand Down

0 comments on commit 3d90dea

Please sign in to comment.