Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
merelymyself committed Jun 1, 2022
1 parent 319618d commit 8210f39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clippy_lints/src/path_from_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ declare_clippy_lint! {
///
/// ### Example
/// ```rust
/// use std::path::PathBuf;
/// let base_path = "/base";
/// PathBuf::from(format!("{}/foo/bar", base_path));
/// ```
/// Use instead:
/// ```rust
/// use std::path::Path;
/// let base_path = "/base";
/// Path::new(base_path).join("foo").join("bar");
/// ```
#[clippy::version = "1.62.0"]
Expand Down

0 comments on commit 8210f39

Please sign in to comment.