aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-21 16:13:26 +0000
committerAleksey Kladov <[email protected]>2018-12-21 16:13:26 +0000
commite086cc8db5edbf38756abca25c8bcc3334a596ff (patch)
tree505357288185e44259dbafc68163597a4fbfcb78 /crates/ra_db
parent9de3a45be6a33e8cc2d7ef86ef0adcbaa0567cf5 (diff)
hide empty changes
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 }