summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-09 15:42:53 +0000
committerBlaž Hrastnik2022-01-23 07:04:12 +0000
commite22dbf102fea06fe7c4292635543ca2e521d299f (patch)
tree487b72a09f27d5fdd5afd9d6a69b0f2351b8ecf2
parent2f4a9fea03ffc7a2fb71ded0281d388289eceba9 (diff)
Use filter_map rather than flat_map
-rw-r--r--helix-core/src/syntax.rs2
1 files changed, 1 insertions, 1 deletions
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();