Skip to content

Commit 3c98ee5

Browse files
authored
Documentation fix
1 parent b18fb92 commit 3c98ee5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clippy_lints/src/path_from_format.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ declare_clippy_lint! {
1717
///
1818
/// ### Example
1919
/// ```rust
20+
/// use std::path::PathBuf;
21+
///
22+
/// let base_path = "dir";
2023
/// PathBuf::from(format!("{}/foo/bar", base_path));
2124
/// ```
2225
/// Use instead:
2326
/// ```rust
27+
/// use std::path::Path;
28+
///
29+
/// let base_path = "dir";
2430
/// Path::new(base_path).join("foo").join("bar")
2531
/// ```
2632
#[clippy::version = "1.62.0"]

0 commit comments

Comments
 (0)