Use CrateName for semantic names

This commit is contained in:
Aleksey Kladov 2020-07-01 09:53:53 +02:00
parent e336a96998
commit 307c6fec61
5 changed files with 30 additions and 14 deletions

View file

@ -288,10 +288,7 @@ impl ProjectWorkspace {
if let (Some(&from), Some(&to)) =
(crates.get(&from_crate_id), crates.get(&to_crate_id))
{
if crate_graph
.add_dep(from, CrateName::new(&dep.name).unwrap(), to)
.is_err()
{
if crate_graph.add_dep(from, dep.name.clone(), to).is_err() {
log::error!(
"cyclic dependency {:?} -> {:?}",
from_crate_id,