From 80386ca5be78d8ea65483df3edeec1a89b09a5a3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 1 Jul 2020 10:03:07 +0200 Subject: Use Strings for display names --- crates/ra_project_model/src/lib.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/ra_project_model') diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index 1533d32c9..8dbf4e6ea 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs @@ -309,13 +309,11 @@ impl ProjectWorkspace { let env = Env::default(); let proc_macro = vec![]; - let crate_name = CrateName::new(&sysroot[krate].name) - .expect("Sysroot crate names should not contain dashes"); - + let name = sysroot[krate].name.clone(); let crate_id = crate_graph.add_crate_root( file_id, Edition::Edition2018, - Some(crate_name), + Some(name), cfg_options.clone(), env, proc_macro, @@ -389,7 +387,7 @@ impl ProjectWorkspace { let crate_id = crate_graph.add_crate_root( file_id, edition, - Some(CrateName::normalize_dashes(&cargo[pkg].name)), + Some(cargo[pkg].name.clone()), cfg_options, env, proc_macro.clone(), -- cgit v1.2.3