mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
fix: crates are limited to ASCII values
This commit is contained in:
parent
ea585ef321
commit
e8ec99811b
1 changed files with 4 additions and 3 deletions
|
@ -20,9 +20,10 @@ pub(super) fn check(cx: &LateContext<'_>, metadata: &Metadata) {
|
|||
// 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()
|
||||
.map(|c| if c == '-' { '_' } else { c })
|
||||
.eq(local_name.as_str().chars())
|
||||
.as_bytes()
|
||||
.iter()
|
||||
.map(|b| if b == &b'-' { &b'_' } else { b })
|
||||
.eq(local_name.as_str().as_bytes())
|
||||
{
|
||||
Some(&p.id)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue