Skip to content

Commit f2f99be

Browse files
committed
Remove lots of Symbol::as_str() calls.
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
1 parent 6f25adb commit f2f99be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clippy_lints/src/attrs.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,11 @@ fn check_clippy_lint_names(cx: &LateContext<'_>, ident: &str, items: &[NestedMet
421421
.iter()
422422
.map(|l| Symbol::intern(&l.name_lower()))
423423
.collect::<Vec<_>>();
424-
let sugg = find_best_match_for_name(symbols.iter(), &format!("clippy::{}", name_lower), None);
424+
let sugg = find_best_match_for_name(
425+
symbols.iter(),
426+
Symbol::intern(&format!("clippy::{}", name_lower)),
427+
None,
428+
);
425429
if lint_name.chars().any(char::is_uppercase)
426430
&& lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok()
427431
{

0 commit comments

Comments
 (0)