diff --git a/clippy_lints/src/path_from_format.rs b/clippy_lints/src/path_from_format.rs index 0f59a7dbaf84..876b7b1a21dc 100644 --- a/clippy_lints/src/path_from_format.rs +++ b/clippy_lints/src/path_from_format.rs @@ -20,14 +20,14 @@ declare_clippy_lint! { /// use std::path::PathBuf; /// /// let base_path = "dir"; - /// PathBuf::from(format!("{}/foo/bar", base_path)) + /// let sample = PathBuf::from(format!("{}/foo/bar", base_path)); /// ``` /// Use instead: /// ```rust /// use std::path::Path; /// /// let base_path = "dir"; - /// Path::new(base_path).join("foo").join("bar") + /// let sample = Path::new(base_path).join("foo").join("bar"); /// ``` #[clippy::version = "1.62.0"] pub PATH_FROM_FORMAT,