From e22dbf102fea06fe7c4292635543ca2e521d299f Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 10 Jan 2022 00:42:53 +0900 Subject: Use filter_map rather than flat_map --- helix-core/src/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-core/src') diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 677392b1..ff547c58 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(); -- cgit v1.2.3-70-g09d2