Open
Description
What it does
Suggest to create PathBuf
s using Path::join
(or maybe PathBuf::push
in some circumstances) instead of string formatting.
Lint Name
path_format
Category
suspicious
Example
PathBuf::from(format!("{}/foo/bar", base_path)); // or
PathBuf::from(format!("{}\\foo\\bar", base_ath));
could be written as
Path::new(base_path).join("foo").join("bar")