mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
kill last cancelables
This commit is contained in:
parent
0bb170a277
commit
8338acfd3a
3 changed files with 7 additions and 8 deletions
|
@ -2,11 +2,11 @@ use ra_syntax::{ast, AstNode,};
|
|||
use ra_db::SyntaxDatabase;
|
||||
|
||||
use crate::{
|
||||
FileId, Cancelable, HighlightedRange,
|
||||
FileId, HighlightedRange,
|
||||
db::RootDatabase,
|
||||
};
|
||||
|
||||
pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> {
|
||||
pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRange> {
|
||||
let source_file = db.source_file(file_id);
|
||||
let mut res = ra_ide_api_light::highlight(source_file.syntax());
|
||||
for macro_call in source_file
|
||||
|
@ -28,7 +28,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Cancelable<Vec<Hi
|
|||
res.extend(mapped_ranges);
|
||||
}
|
||||
}
|
||||
Ok(res)
|
||||
res
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue