about summary refs log tree commit diff
path: root/clippy_utils/src
diff options
context:
space:
mode:
authorTakayuki Maeda <takoyaki0316@gmail.com>2022-06-13 15:48:40 +0900
committerTakayuki Maeda <takoyaki0316@gmail.com>2022-06-13 15:48:40 +0900
commitf2d9acfc019c132635d419f14f6b09ee222a1103 (patch)
tree52f63f63c1ee92116d9f2f8cbcb26bd2673fe604 /clippy_utils/src
parente34621c24ee3e5dd9b060d04633ec4ee5f47fe40 (diff)
downloadrust-f2d9acfc019c132635d419f14f6b09ee222a1103.tar.gz
rust-f2d9acfc019c132635d419f14f6b09ee222a1103.zip
remove unnecessary `to_string` and `String::new`
Diffstat (limited to 'clippy_utils/src')
-rw-r--r--clippy_utils/src/attrs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/attrs.rs b/clippy_utils/src/attrs.rs
index 49318849d58..186bba09d20 100644
--- a/clippy_utils/src/attrs.rs
+++ b/clippy_utils/src/attrs.rs
@@ -92,7 +92,7 @@ pub fn get_attr<'a>(
                                 diag.span_suggestion(
                                     attr_segments[1].ident.span,
                                     "consider using",
-                                    new_name.to_string(),
+                                    new_name,
                                     Applicability::MachineApplicable,
                                 );
                                 diag.emit();