diff options
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 970b78412..e4089afe7 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -35,19 +35,19 @@ pub struct CrateDependency { | |||
35 | } | 35 | } |
36 | 36 | ||
37 | impl Crate { | 37 | impl Crate { |
38 | pub fn crate_id(&self) -> CrateId { | 38 | pub fn crate_id(self) -> CrateId { |
39 | self.crate_id | 39 | self.crate_id |
40 | } | 40 | } |
41 | 41 | ||
42 | pub fn dependencies(&self, db: &impl DefDatabase) -> Vec<CrateDependency> { | 42 | pub fn dependencies(self, db: &impl DefDatabase) -> Vec<CrateDependency> { |
43 | self.dependencies_impl(db) | 43 | self.dependencies_impl(db) |
44 | } | 44 | } |
45 | 45 | ||
46 | pub fn root_module(&self, db: &impl DefDatabase) -> Option<Module> { | 46 | pub fn root_module(self, db: &impl DefDatabase) -> Option<Module> { |
47 | self.root_module_impl(db) | 47 | self.root_module_impl(db) |
48 | } | 48 | } |
49 | 49 | ||
50 | pub fn edition(&self, db: &impl DefDatabase) -> Edition { | 50 | pub fn edition(self, db: &impl DefDatabase) -> Edition { |
51 | let crate_graph = db.crate_graph(); | 51 | let crate_graph = db.crate_graph(); |
52 | crate_graph.edition(self.crate_id) | 52 | crate_graph.edition(self.crate_id) |
53 | } | 53 | } |