From e22dbf102fea06fe7c4292635543ca2e521d299f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Mon, 10 Jan 2022 00:42:53 +0900 Subject: [PATCH] Use filter_map rather than flat_map --- helix-core/src/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 677392b1e..ff547c588 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -723,7 +723,7 @@ impl Syntax { let mut layers = self .layers .iter() - .flat_map(|(_, layer)| { + .filter_map(|(_, layer)| { // Reuse a cursor from the pool if available. let mut cursor = PARSER.with(|ts_parser| { let highlighter = &mut ts_parser.borrow_mut();