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! {
16
16
/// Checks for calls to `push` immediately after creating a new `PathBuf`.
17
17
///
18
18
/// ### 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.
20
22
///
21
23
/// ### 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.
23
26
///
24
27
/// ### Example
25
28
/// ```rust
You can’t perform that action at this time.
0 commit comments