fix: add fix for bug, fix test name

This commit is contained in:
Kristof Mattei 2024-01-13 17:44:27 -07:00
parent 5769c21f23
commit d975e267b9
No known key found for this signature in database
GPG Key ID: 89668E582D199AA8
3 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ pub(super) fn check(cx: &LateContext<'_>, metadata: &Metadata) {
if let Some(resolve) = &metadata.resolve
&& let Some(local_id) = packages.iter().find_map(|p| {
if p.name == local_name.as_str() {
if p.name.replace('-', "_") == local_name.as_str() {
Some(&p.id)
} else {
None

View File

@ -3,4 +3,4 @@ error: multiple versions for dependency `winapi`: 0.2.8, 0.3.9
= note: `-D clippy::multiple-crate-versions` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::multiple_crate_versions)]`
error: could not compile `multiple-crate-versions-with-dashes` (bin "multiple-crate-versions-with-dashes") due to 1 previous error
error: could not compile `multiple-crate-versions` (bin "multiple-crate-versions") due to 1 previous error

View File

@ -1,7 +1,8 @@
# Should not lint for dev or build dependencies. See issue 5041.
[package]
name = "multiple-crate-versions-with-dashes"
# purposefully separated by - instead of _
name = "multiple-crate-versions"
version = "0.1.0"
publish = false