aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model_impl
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-23 18:30:09 +0100
committerAleksey Kladov <[email protected]>2019-05-23 18:30:09 +0100
commit7f22f905037f4a6c15195263e9bb6bcb022d65b6 (patch)
treea9b666a25793abb1d32f6ee30e3612323c82f30f /crates/ra_hir/src/code_model_impl
parentdbd02546b9cea2a2633cd0414040980f8e4a29e1 (diff)
kill krate_impl
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r--crates/ra_hir/src/code_model_impl/krate.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/crates/ra_hir/src/code_model_impl/krate.rs b/crates/ra_hir/src/code_model_impl/krate.rs
deleted file mode 100644
index 914414fc3..000000000
--- a/crates/ra_hir/src/code_model_impl/krate.rs
+++ /dev/null
@@ -1,22 +0,0 @@
1use crate::{
2 Crate, CrateDependency, AsName, Module, DefDatabase,
3};
4
5impl Crate {
6 pub(crate) fn dependencies_impl(&self, db: &impl DefDatabase) -> Vec<CrateDependency> {
7 let crate_graph = db.crate_graph();
8 crate_graph
9 .dependencies(self.crate_id)
10 .map(|dep| {
11 let krate = Crate { crate_id: dep.crate_id() };
12 let name = dep.as_name();
13 CrateDependency { krate, name }
14 })
15 .collect()
16 }
17 pub(crate) fn root_module_impl(&self, db: &impl DefDatabase) -> Option<Module> {
18 let module_id = db.crate_def_map(*self).root();
19 let module = Module { krate: *self, module_id };
20 Some(module)
21 }
22}