about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMateusz Gacek <96mateusz.gacek@gmail.com>2021-03-05 12:11:31 -0800
committerMateusz Gacek <96mateusz.gacek@gmail.com>2021-03-05 12:11:31 -0800
commita0b7f9b3a09c9dbb3a773b1b584abbf3c6f031c7 (patch)
treed867f1404e507b68f693bf9fa93aadf38a62743e
parent54def1e14541f34a99c8dd912bd9e397b26d7eb2 (diff)
downloadrust-a0b7f9b3a09c9dbb3a773b1b584abbf3c6f031c7.tar.gz
rust-a0b7f9b3a09c9dbb3a773b1b584abbf3c6f031c7.zip
useless_format: fix examples in the description
"Good" example was something not acceptable by the useless_format lint.
-rw-r--r--clippy_lints/src/format.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs
index 8e41e0e34da..fd6bf19db94 100644
--- a/clippy_lints/src/format.rs
+++ b/clippy_lints/src/format.rs
@@ -28,11 +28,11 @@ declare_clippy_lint! {
     /// ```rust
     ///
     /// // Bad
-    /// # let foo = "foo";
+    /// let foo = "foo";
     /// format!("{}", foo);
     ///
     /// // Good
-    /// format!("foo");
+    /// foo.to_owned();
     /// ```
     pub USELESS_FORMAT,
     complexity,