Skip to content

Commit 8210f39

Browse files
committed
docs
1 parent 319618d commit 8210f39

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clippy_lints/src/path_from_format.rs

+4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ declare_clippy_lint! {
1717
///
1818
/// ### Example
1919
/// ```rust
20+
/// use std::path::PathBuf;
21+
/// let base_path = "/base";
2022
/// PathBuf::from(format!("{}/foo/bar", base_path));
2123
/// ```
2224
/// Use instead:
2325
/// ```rust
26+
/// use std::path::Path;
27+
/// let base_path = "/base";
2428
/// Path::new(base_path).join("foo").join("bar");
2529
/// ```
2630
#[clippy::version = "1.62.0"]

0 commit comments

Comments
 (0)