From f2f99be2ff619aeb67259b73b51992d026fc11fe Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 8 Jul 2020 20:03:37 +1000 Subject: [PATCH] Remove lots of `Symbol::as_str()` calls. In various ways, such as changing functions to take a `Symbol` instead of a `&str`. --- clippy_lints/src/attrs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index ef01364b7d96..c29432bf9338 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -421,7 +421,11 @@ fn extract_name(lint: &NestedMetaItem) -> Option { .iter() .map(|l| Symbol::intern(&l.name_lower())) .collect::>(); - 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) && lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok() {