kill last cancelables

This commit is contained in:
Aleksey Kladov 2019-01-15 21:17:10 +03:00
parent 0bb170a277
commit 8338acfd3a
3 changed files with 7 additions and 8 deletions

View file

@ -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)]