Skip to content

Commit a0c4dbc

Browse files
committed
Minor
1 parent db21800 commit a0c4dbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/project_model/src/workspace.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ impl ProjectWorkspace {
305305
// Set deps to the core, std and to the lib target of the current package
306306
for &from in pkg_crates.get(&pkg).into_iter().flatten() {
307307
if let Some((to, name)) = lib_tgt.clone() {
308-
// For root projects with dashes in their name,
309-
// cargo metadata does not do any normalization,
310-
// so we do it ourselves currently
311-
let name = CrateName::normalize_dashes(&name);
312308
if to != from {
309+
// For root projects with dashes in their name,
310+
// cargo metadata does not do any normalization,
311+
// so we do it ourselves currently
312+
let name = CrateName::normalize_dashes(&name);
313313
add_dep(&mut crate_graph, from, name, to);
314314
}
315315
}

0 commit comments

Comments
 (0)