Skip to content

Commit b1c52d5

Browse files
chore: add comments to explain reasoning
1 parent 5d06fbb commit b1c52d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_lints/src/cargo/multiple_crate_versions.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ pub(super) fn check(cx: &LateContext<'_>, metadata: &Metadata) {
1616

1717
if let Some(resolve) = &metadata.resolve
1818
&& let Some(local_id) = packages.iter().find_map(|p| {
19+
// p.name contains the original crate names with dashes intact
20+
// local_name contains the crate name as a namespace, with the dashes converted to underscores
21+
// the code below temporarily rectifies this discrepancy
1922
if p.name
2023
.chars()
2124
.into_iter()

0 commit comments

Comments
 (0)