aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index 71976071f..5a1657788 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -137,7 +137,7 @@ impl CargoWorkspace {
137 for meta_pkg in meta.packages { 137 for meta_pkg in meta.packages {
138 let is_member = ws_members.contains(&meta_pkg.id); 138 let is_member = ws_members.contains(&meta_pkg.id);
139 let pkg = packages.alloc(PackageData { 139 let pkg = packages.alloc(PackageData {
140 name: meta_pkg.name.into(), 140 name: meta_pkg.name,
141 manifest: meta_pkg.manifest_path.clone(), 141 manifest: meta_pkg.manifest_path.clone(),
142 targets: Vec::new(), 142 targets: Vec::new(),
143 is_member, 143 is_member,
@@ -149,7 +149,7 @@ impl CargoWorkspace {
149 for meta_tgt in meta_pkg.targets { 149 for meta_tgt in meta_pkg.targets {
150 let tgt = targets.alloc(TargetData { 150 let tgt = targets.alloc(TargetData {
151 pkg, 151 pkg,
152 name: meta_tgt.name.into(), 152 name: meta_tgt.name,
153 root: meta_tgt.src_path.clone(), 153 root: meta_tgt.src_path.clone(),
154 kind: TargetKind::new(meta_tgt.kind.as_slice()), 154 kind: TargetKind::new(meta_tgt.kind.as_slice()),
155 }); 155 });
@@ -160,8 +160,7 @@ impl CargoWorkspace {
160 for node in resolve.nodes { 160 for node in resolve.nodes {
161 let source = pkg_by_id[&node.id]; 161 let source = pkg_by_id[&node.id];
162 for dep_node in node.deps { 162 for dep_node in node.deps {
163 let dep = 163 let dep = PackageDependency { name: dep_node.name, pkg: pkg_by_id[&dep_node.pkg] };
164 PackageDependency { name: dep_node.name.into(), pkg: pkg_by_id[&dep_node.pkg] };
165 packages[source].dependencies.push(dep); 164 packages[source].dependencies.push(dep);
166 } 165 }
167 } 166 }