From 40424d4222d4630bc53294d10f1718f2d3d300de Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:21:08 -0400 Subject: Fix clippy::identity_conversion --- crates/ra_project_model/src/cargo_workspace.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/ra_project_model') 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 { for meta_pkg in meta.packages { let is_member = ws_members.contains(&meta_pkg.id); let pkg = packages.alloc(PackageData { - name: meta_pkg.name.into(), + name: meta_pkg.name, manifest: meta_pkg.manifest_path.clone(), targets: Vec::new(), is_member, @@ -149,7 +149,7 @@ impl CargoWorkspace { for meta_tgt in meta_pkg.targets { let tgt = targets.alloc(TargetData { pkg, - name: meta_tgt.name.into(), + name: meta_tgt.name, root: meta_tgt.src_path.clone(), kind: TargetKind::new(meta_tgt.kind.as_slice()), }); @@ -160,8 +160,7 @@ impl CargoWorkspace { for node in resolve.nodes { let source = pkg_by_id[&node.id]; for dep_node in node.deps { - let dep = - PackageDependency { name: dep_node.name.into(), pkg: pkg_by_id[&dep_node.pkg] }; + let dep = PackageDependency { name: dep_node.name, pkg: pkg_by_id[&dep_node.pkg] }; packages[source].dependencies.push(dep); } } -- cgit v1.2.3