]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/inherent_to_string.rs
Rollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomez
[rust.git] / src / tools / clippy / clippy_lints / src / inherent_to_string.rs
index 94db1773fda69b081ca6b62230f5aacb3659491c..17d867aacb533b3d483e25d16cf31d74b224684f 100644 (file)
@@ -98,7 +98,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<
         if_chain! {
             // Check if item is a method, called to_string and has a parameter 'self'
             if let ImplItemKind::Fn(ref signature, _) = impl_item.kind;
-            if impl_item.ident.name.as_str() == "to_string";
+            if impl_item.ident.name == sym::to_string;
             let decl = &signature.decl;
             if decl.implicit_self.has_implicit_self();
             if decl.inputs.len() == 1;