diff options
Diffstat (limited to 'crates/ra_ide_api/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide_api/src/syntax_highlighting.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index 0e5253025..477827fa7 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs | |||
@@ -237,8 +237,7 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo | |||
237 | let mut buf = String::new(); | 237 | let mut buf = String::new(); |
238 | buf.push_str(&STYLE); | 238 | buf.push_str(&STYLE); |
239 | buf.push_str("<pre><code>"); | 239 | buf.push_str("<pre><code>"); |
240 | let tokens = | 240 | let tokens = parse.tree().syntax().descendants_with_tokens().filter_map(|it| it.into_token()); |
241 | parse.tree().syntax().descendants_with_tokens().filter_map(|it| it.as_token().cloned()); | ||
242 | for token in tokens { | 241 | for token in tokens { |
243 | could_intersect.retain(|it| token.range().start() <= it.range.end()); | 242 | could_intersect.retain(|it| token.range().start() <= it.range.end()); |
244 | while let Some(r) = ranges.get(frontier) { | 243 | while let Some(r) = ranges.get(frontier) { |