aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/krate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/krate.rs')
-rw-r--r--crates/ra_hir/src/krate.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir/src/krate.rs b/crates/ra_hir/src/krate.rs
index 1196dcef1..89b1e639e 100644
--- a/crates/ra_hir/src/krate.rs
+++ b/crates/ra_hir/src/krate.rs
@@ -1,7 +1,6 @@
1use ra_syntax::SmolStr;
2pub use ra_db::CrateId; 1pub use ra_db::CrateId;
3 2
4use crate::{HirDatabase, Module, Cancelable}; 3use crate::{HirDatabase, Module, Cancelable, Name, AsName};
5 4
6/// hir::Crate describes a single crate. It's the main inteface with which 5/// hir::Crate describes a single crate. It's the main inteface with which
7/// crate's dependencies interact. Mostly, it should be just a proxy for the 6/// crate's dependencies interact. Mostly, it should be just a proxy for the
@@ -14,7 +13,7 @@ pub struct Crate {
14#[derive(Debug)] 13#[derive(Debug)]
15pub struct CrateDependency { 14pub struct CrateDependency {
16 pub krate: Crate, 15 pub krate: Crate,
17 pub name: SmolStr, 16 pub name: Name,
18} 17}
19 18
20impl Crate { 19impl Crate {
@@ -27,7 +26,7 @@ impl Crate {
27 .dependencies(self.crate_id) 26 .dependencies(self.crate_id)
28 .map(|dep| { 27 .map(|dep| {
29 let krate = Crate::new(dep.crate_id()); 28 let krate = Crate::new(dep.crate_id());
30 let name = dep.name.clone(); 29 let name = dep.as_name();
31 CrateDependency { krate, name } 30 CrateDependency { krate, name }
32 }) 31 })
33 .collect() 32 .collect()