File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,13 @@ declare_clippy_lint! {
1616 /// Checks for calls to `push` immediately after creating a new `PathBuf`.
1717 ///
1818 /// ### Why is this bad?
19- /// The `.join()` is easier to read than multiple `push` calls.
19+ /// Multiple `.join()` calls are usually easier to read than multiple `.push`
20+ /// calls across multiple statements. It might also be possible to use
21+ /// `PathBuf::from` instead.
2022 ///
2123 /// ### Known problems
22- /// `.join()` introduces an implicit `clone()`
24+ /// `.join()` introduces an implicit `clone()`. `PathBuf::from` can alternativly be
25+ /// used when the `PathBuf` is newly constructed. This will avoild the implicit clone.
2326 ///
2427 /// ### Example
2528 /// ```rust
You can’t perform that action at this time.
0 commit comments