mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Use Strings for display names
This commit is contained in:
parent
307c6fec61
commit
80386ca5be
5 changed files with 15 additions and 15 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue