We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8a6c7f commit e905f73Copy full SHA for e905f73
clippy_lints/src/path_from_format.rs
@@ -20,14 +20,14 @@ declare_clippy_lint! {
20
/// use std::path::PathBuf;
21
///
22
/// let base_path = "dir";
23
- /// PathBuf::from(format!("{}/foo/bar", base_path))
+ /// let sample = PathBuf::from(format!("{}/foo/bar", base_path));
24
/// ```
25
/// Use instead:
26
/// ```rust
27
/// use std::path::Path;
28
29
30
- /// Path::new(base_path).join("foo").join("bar")
+ /// let sample = Path::new(base_path).join("foo").join("bar");
31
32
#[clippy::version = "1.62.0"]
33
pub PATH_FROM_FORMAT,
0 commit comments