From b1c52d502d6c0441c944225287281c70282c1c9b Mon Sep 17 00:00:00 2001 From: Kristof Mattei <864376+Kristof-Mattei@users.noreply.github.com> Date: Sun, 14 Jan 2024 09:32:36 -0700 Subject: [PATCH] chore: add comments to explain reasoning --- clippy_lints/src/cargo/multiple_crate_versions.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clippy_lints/src/cargo/multiple_crate_versions.rs b/clippy_lints/src/cargo/multiple_crate_versions.rs index 8e86c0017e1d..c487ffb1c822 100644 --- a/clippy_lints/src/cargo/multiple_crate_versions.rs +++ b/clippy_lints/src/cargo/multiple_crate_versions.rs @@ -16,6 +16,9 @@ pub(super) fn check(cx: &LateContext<'_>, metadata: &Metadata) { if let Some(resolve) = &metadata.resolve && let Some(local_id) = packages.iter().find_map(|p| { + // p.name contains the original crate names with dashes intact + // local_name contains the crate name as a namespace, with the dashes converted to underscores + // the code below temporarily rectifies this discrepancy if p.name .chars() .into_iter()