diff options
author | Alan Du <[email protected]> | 2019-06-03 15:21:08 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 40424d4222d4630bc53294d10f1718f2d3d300de (patch) | |
tree | 4e27c7f2ce4a886e9a512b4986509b0927ae9ea1 /crates/ra_project_model | |
parent | ed3d93b875f25da6f81b8a107a8c200311240627 (diff) |
Fix clippy::identity_conversion
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 7 |
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 | } |