aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/src/input.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index f12dd9345..ead8dfe48 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -98,6 +98,9 @@ impl CrateGraph {
98 pub fn add_dep(&mut self, from: CrateId, name: SmolStr, to: CrateId) { 98 pub fn add_dep(&mut self, from: CrateId, name: SmolStr, to: CrateId) {
99 self.arena.get_mut(&from).unwrap().add_dep(name, to) 99 self.arena.get_mut(&from).unwrap().add_dep(name, to)
100 } 100 }
101 pub fn is_empty(&self) -> bool {
102 self.arena.is_empty()
103 }
101 pub fn crate_root(&self, crate_id: CrateId) -> FileId { 104 pub fn crate_root(&self, crate_id: CrateId) -> FileId {
102 self.arena[&crate_id].file_id 105 self.arena[&crate_id].file_id
103 } 106 }