diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-07-08 20:03:37 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-07-15 09:01:35 +1000 |
| commit | f2f99be2ff619aeb67259b73b51992d026fc11fe (patch) | |
| tree | 4a6eace95f7f720aad76ffb862e5a96d21a9e4e2 | |
| parent | 6f25adbd5a1600653e8edf8de7135c397d73c07a (diff) | |
| download | rust-f2f99be2ff619aeb67259b73b51992d026fc11fe.tar.gz rust-f2f99be2ff619aeb67259b73b51992d026fc11fe.zip | |
Remove lots of `Symbol::as_str()` calls.
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
| -rw-r--r-- | clippy_lints/src/attrs.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs index ef01364b7d9..c29432bf933 100644 --- a/clippy_lints/src/attrs.rs +++ b/clippy_lints/src/attrs.rs @@ -421,7 +421,11 @@ fn check_clippy_lint_names(cx: &LateContext<'_>, ident: &str, items: &[NestedMet .iter() .map(|l| Symbol::intern(&l.name_lower())) .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) && lint_store.find_lints(&format!("clippy::{}", name_lower)).is_ok() { |
