From b6ce7a6d344fa673addcd299cbb19b050625e04d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Dec 2018 10:26:24 +0300 Subject: make it compile --- crates/ra_analysis/src/db.rs | 3 +++ crates/ra_analysis/src/imp.rs | 9 +-------- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'crates/ra_analysis/src') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index b8d774eb5..9f39d3a59 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -61,7 +61,10 @@ salsa::database_storage! { pub(crate) struct RootDatabaseStorage for RootDatabase { impl ra_db::FilesDatabase { fn file_text() for ra_db::FileTextQuery; + fn file_relative_path() for ra_db::FileRelativePathQuery; fn file_source_root() for ra_db::FileSourceRootQuery; + fn source_root_files() for ra_db::SourceRootFilesQuery; + fn source_root_file_by_path() for ra_db::SourceRootFileByPathQuery; fn source_root() for ra_db::SourceRootQuery; fn libraries() for ra_db::LibrariesQuery; fn crate_graph() for ra_db::CrateGraphQuery; diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 0de0e2645..e2c20b0e3 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs @@ -51,9 +51,6 @@ impl AnalysisHostImpl { .set(file_id, Arc::new(text)) } if !(change.files_added.is_empty() && change.files_removed.is_empty()) { - let file_resolver = change - .file_resolver - .expect("change resolver when changing set of files"); let mut source_root = SourceRoot::clone(&self.db.source_root(WORKSPACE)); for (file_id, text) in change.files_added { self.db @@ -70,7 +67,6 @@ impl AnalysisHostImpl { .set(file_id, Arc::new(String::new())); source_root.files.remove(&file_id); } - source_root.file_resolver = file_resolver; self.db .query_mut(ra_db::SourceRootQuery) .set(WORKSPACE, Arc::new(source_root)) @@ -95,10 +91,7 @@ impl AnalysisHostImpl { .query_mut(ra_db::FileTextQuery) .set_constant(file_id, Arc::new(text)); } - let source_root = SourceRoot { - files, - file_resolver: library.file_resolver, - }; + let source_root = SourceRoot { files }; self.db .query_mut(ra_db::SourceRootQuery) .set(source_root_id, Arc::new(source_root)); -- cgit v1.2.3