diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting/injector.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting/injector.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting/injector.rs b/crates/ide/src/syntax_highlighting/injector.rs index e8f17eb69..fd4025694 100644 --- a/crates/ide/src/syntax_highlighting/injector.rs +++ b/crates/ide/src/syntax_highlighting/injector.rs | |||
@@ -33,8 +33,7 @@ impl Injector { | |||
33 | &self.buf | 33 | &self.buf |
34 | } | 34 | } |
35 | pub(super) fn map_range_up(&self, range: TextRange) -> impl Iterator<Item = TextRange> + '_ { | 35 | pub(super) fn map_range_up(&self, range: TextRange) -> impl Iterator<Item = TextRange> + '_ { |
36 | let (start, len) = equal_range_by(&self.ranges, |&(r, _)| ordering(r, range)); | 36 | equal_range_by(&self.ranges, |&(r, _)| ordering(r, range)).filter_map(move |i| { |
37 | (start..start + len).filter_map(move |i| { | ||
38 | let (target_range, delta) = self.ranges[i]; | 37 | let (target_range, delta) = self.ranges[i]; |
39 | let intersection = target_range.intersect(range).unwrap(); | 38 | let intersection = target_range.intersect(range).unwrap(); |
40 | Some(intersection + delta?) | 39 | Some(intersection + delta?) |