From 3d90deac28d78d2ced89db368cdd8c5a7eb76b27 Mon Sep 17 00:00:00 2001 From: ontley Date: Thu, 2 Nov 2023 11:43:25 +0100 Subject: [PATCH] Replaced filter_map with flatten --- helix-lsp/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index 20205c511..f8aa7f36e 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -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); }