Make Analysis api cancellable

This commit is contained in:
Kirill Bulatov 2019-07-25 20:22:41 +03:00
parent a8e37ddbc8
commit dbbb0beb3e
8 changed files with 107 additions and 87 deletions

View file

@ -55,7 +55,7 @@ pub(crate) fn run(verbose: bool, path: &Path, op: Op) -> Result<()> {
Op::Complete { line, column, .. } => {
let offset = host
.analysis()
.file_line_index(file_id)
.file_line_index(file_id)?
.offset(LineCol { line, col_utf16: column });
let file_postion = FilePosition { file_id, offset };