]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/octal_escapes.rs
Rollup merge of #106287 - Nilstrieb:its-bugging-me-how-we-dont-have-docs, r=jyn514
[rust.git] / src / tools / clippy / clippy_lints / src / octal_escapes.rs
index ae0a41db918a3447067342479161c62939e71e9e..7376ab0c846d954c7c3c39e75b177a83e5f4ff82 100644 (file)
@@ -125,7 +125,7 @@ fn check_lit(cx: &EarlyContext<'_>, lit: &Lit, span: Span, is_string: bool) {
             if is_string { "string" } else { "byte string" }
         ),
         |diag| {
-            diag.help(&format!(
+            diag.help(format!(
                 "octal escapes are not supported, `\\0` is always a null {}",
                 if is_string { "character" } else { "byte" }
             ));
@@ -139,7 +139,7 @@ fn check_lit(cx: &EarlyContext<'_>, lit: &Lit, span: Span, is_string: bool) {
             // suggestion 2: unambiguous null byte
             diag.span_suggestion(
                 span,
-                &format!(
+                format!(
                     "if the null {} is intended, disambiguate using",
                     if is_string { "character" } else { "byte" }
                 ),