mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-16 05:58:41 +00:00
Remove lots of Symbol::as_str()
calls.
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
This commit is contained in:
parent
6f25adbd5a
commit
f2f99be2ff
1 changed files with 5 additions and 1 deletions
|
@ -421,7 +421,11 @@ fn check_clippy_lint_names(cx: &LateContext<'_>, ident: &str, items: &[NestedMet
|
||||||
.iter()
|
.iter()
|
||||||
.map(|l| Symbol::intern(&l.name_lower()))
|
.map(|l| Symbol::intern(&l.name_lower()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let sugg = find_best_match_for_name(symbols.iter(), &format!("clippy::{}", name_lower), None);
|
let sugg = find_best_match_for_name(
|
||||||
|
symbols.iter(),
|
||||||
|
Symbol::intern(&format!("clippy::{}", name_lower)),
|
||||||
|
None,
|
||||||
|
);
|
||||||
if lint_name.chars().any(char::is_uppercase)
|
if lint_name.chars().any(char::is_uppercase)
|
||||||
&& lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok()
|
&& lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue