mirror of https://github.com/helix-editor/helix
Use filter_map rather than flat_map
parent
2f4a9fea03
commit
e22dbf102f
|
@ -723,7 +723,7 @@ impl Syntax {
|
||||||
let mut layers = self
|
let mut layers = self
|
||||||
.layers
|
.layers
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(|(_, layer)| {
|
.filter_map(|(_, layer)| {
|
||||||
// Reuse a cursor from the pool if available.
|
// Reuse a cursor from the pool if available.
|
||||||
let mut cursor = PARSER.with(|ts_parser| {
|
let mut cursor = PARSER.with(|ts_parser| {
|
||||||
let highlighter = &mut ts_parser.borrow_mut();
|
let highlighter = &mut ts_parser.borrow_mut();
|
||||||
|
|
Loading…
Reference in New Issue