about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-17 12:46:18 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2024-02-17 12:46:18 +0100
commit1ac4d934a8fb0541fb2ae089e7c8d068fe622f02 (patch)
tree9e14c89009256b6f788835325150b55826491840
parentc9fcfea90ae62704cd44bdf97eb97f9df4bda8b4 (diff)
downloadrust-1ac4d934a8fb0541fb2ae089e7c8d068fe622f02.tar.gz
rust-1ac4d934a8fb0541fb2ae089e7c8d068fe622f02.zip
remove a couple of redundant clones
-rw-r--r--clippy_utils/src/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/diagnostics.rs b/clippy_utils/src/diagnostics.rs
index 56978eb2ee8..5199959c0f2 100644
--- a/clippy_utils/src/diagnostics.rs
+++ b/clippy_utils/src/diagnostics.rs
@@ -84,9 +84,9 @@ pub fn span_lint_and_help<T: LintContext>(
     cx.span_lint(lint, span, msg.to_string(), |diag| {
         let help = help.to_string();
         if let Some(help_span) = help_span {
-            diag.span_help(help_span, help.to_string());
+            diag.span_help(help_span, help);
         } else {
-            diag.help(help.to_string());
+            diag.help(help);
         }
         docs_link(diag, lint);
     });