aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-01 09:03:07 +0100
committerAleksey Kladov <[email protected]>2020-07-01 09:03:07 +0100
commit80386ca5be78d8ea65483df3edeec1a89b09a5a3 (patch)
tree6e58b419e0d877c4ab9f784ab85e6ca564c1cf04 /crates/ra_project_model
parent307c6fec618d5e509c754362687253ef44bb5f3f (diff)
Use Strings for display names
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r--crates/ra_project_model/src/lib.rs8
1 files changed, 3 insertions, 5 deletions
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 {
309 309
310 let env = Env::default(); 310 let env = Env::default();
311 let proc_macro = vec![]; 311 let proc_macro = vec![];
312 let crate_name = CrateName::new(&sysroot[krate].name) 312 let name = sysroot[krate].name.clone();
313 .expect("Sysroot crate names should not contain dashes");
314
315 let crate_id = crate_graph.add_crate_root( 313 let crate_id = crate_graph.add_crate_root(
316 file_id, 314 file_id,
317 Edition::Edition2018, 315 Edition::Edition2018,
318 Some(crate_name), 316 Some(name),
319 cfg_options.clone(), 317 cfg_options.clone(),
320 env, 318 env,
321 proc_macro, 319 proc_macro,
@@ -389,7 +387,7 @@ impl ProjectWorkspace {
389 let crate_id = crate_graph.add_crate_root( 387 let crate_id = crate_graph.add_crate_root(
390 file_id, 388 file_id,
391 edition, 389 edition,
392 Some(CrateName::normalize_dashes(&cargo[pkg].name)), 390 Some(cargo[pkg].name.clone()),
393 cfg_options, 391 cfg_options,
394 env, 392 env,
395 proc_macro.clone(), 393 proc_macro.clone(),