mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
fix: add fix for bug, fix test name
This commit is contained in:
parent
5769c21f23
commit
d975e267b9
3 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue