From 11f3c8afb23d67acde8cc7642aea3a2ca06a2361 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 18:13:11 +0300 Subject: remove Cancelable from source binders --- crates/ra_ide_api/src/symbol_index.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/symbol_index.rs') diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index b7a3a3550..e7827fdc9 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs @@ -63,7 +63,7 @@ fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Cancelable>(); - for (name, text_range) in hir::source_binder::macro_symbols(db, file_id)? { + for (name, text_range) in hir::source_binder::macro_symbols(db, file_id) { let node = find_covering_node(source_file.syntax(), text_range); let ptr = LocalSyntaxPtr::new(node); symbols.push(FileSymbol { file_id, name, ptr }) -- cgit v1.2.3 From fb012e5c1e49af73b480127bcf56d8f5993b8032 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 15 Jan 2019 18:19:09 +0300 Subject: remove cancelable from symbols --- crates/ra_ide_api/src/symbol_index.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'crates/ra_ide_api/src/symbol_index.rs') diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index e7827fdc9..74165d68f 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs @@ -37,13 +37,13 @@ use salsa::ParallelDatabase; use rayon::prelude::*; use crate::{ - Cancelable, FileId, Query, + FileId, Query, db::RootDatabase, }; salsa::query_group! { pub(crate) trait SymbolsDatabase: hir::db::HirDatabase { - fn file_symbols(file_id: FileId) -> Cancelable> { + fn file_symbols(file_id: FileId) -> Arc { type FileSymbolsQuery; } fn library_symbols(id: SourceRootId) -> Arc { @@ -53,7 +53,7 @@ salsa::query_group! { } } -fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Cancelable> { +fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc { db.check_canceled(); let source_file = db.source_file(file_id); let mut symbols = source_file @@ -69,10 +69,10 @@ fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Cancelable Cancelable> { +pub(crate) fn world_symbols(db: &RootDatabase, query: Query) -> Vec { /// Need to wrap Snapshot to provide `Clone` impl for `map_with` struct Snap(salsa::Snapshot); impl Clone for Snap { @@ -98,10 +98,9 @@ pub(crate) fn world_symbols(db: &RootDatabase, query: Query) -> Cancelable