From 4dffdcf14abe0c79f9d7a9702be77958be1f75b1 Mon Sep 17 00:00:00 2001 From: csmoe Date: Fri, 1 Feb 2019 18:33:41 +0800 Subject: split HirDatabase api --- crates/ra_hir/src/query_definitions.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/query_definitions.rs') diff --git a/crates/ra_hir/src/query_definitions.rs b/crates/ra_hir/src/query_definitions.rs index 734a98282..b4d8da1e6 100644 --- a/crates/ra_hir/src/query_definitions.rs +++ b/crates/ra_hir/src/query_definitions.rs @@ -6,17 +6,20 @@ use ra_syntax::{ use crate::{ SourceFileItems, SourceItemId, HirFileId, - db::HirDatabase, + PersistentHirDatabase, }; -pub(super) fn file_items(db: &impl HirDatabase, file_id: HirFileId) -> Arc { +pub(super) fn file_items( + db: &impl PersistentHirDatabase, + file_id: HirFileId, +) -> Arc { let source_file = db.hir_parse(file_id); let res = SourceFileItems::new(file_id, &source_file); Arc::new(res) } pub(super) fn file_item( - db: &impl HirDatabase, + db: &impl PersistentHirDatabase, source_item_id: SourceItemId, ) -> TreeArc { let source_file = db.hir_parse(source_item_id.file_id); -- cgit v1.2.3