@@ -5,7 +5,7 @@ LL | PathBuf::from(format!("{}/foo/bar", base_path1));
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
= note: `-D clippy::path-from-format` implied by `-D warnings`
8
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
8
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
9
9
|
10
10
LL | Path::new(base_path1).join("foo").join("bar");
11
11
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -16,7 +16,7 @@ error: `format!(..)` used to form `PathBuf`
16
16
LL | PathBuf::from(format!("/foo/bar/{}", base_path1));
17
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
|
19
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
19
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
20
20
|
21
21
LL | Path::new("/").join("foo").join("bar").join(base_path1);
22
22
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -27,7 +27,7 @@ error: `format!(..)` used to form `PathBuf`
27
27
LL | PathBuf::from(format!("/foo/{}/bar", base_path1));
28
28
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
29
|
30
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
30
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
31
31
|
32
32
LL | Path::new("/").join("foo").join(base_path1).join("bar");
33
33
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -38,7 +38,7 @@ error: `format!(..)` used to form `PathBuf`
38
38
LL | PathBuf::from(format!("foo/{}/bar", base_path1));
39
39
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
40
|
41
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
41
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
42
42
|
43
43
LL | Path::new("foo").join(base_path1).join("bar");
44
44
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -49,7 +49,7 @@ error: `format!(..)` used to form `PathBuf`
49
49
LL | PathBuf::from(format!("foo/foooo/{base_path1}/bar/barrr"));
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
51
|
52
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
52
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
53
53
|
54
54
LL | Path::new("foo").join("foooo").join(base_path1).join("bar").join("barrr");
55
55
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -60,7 +60,7 @@ error: `format!(..)` used to form `PathBuf`
60
60
LL | PathBuf::from(format!("foo/foooo/{base_path1}/bar/barrr"));
61
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62
62
|
63
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
63
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
64
64
|
65
65
LL | Path::new("foo").join("foooo").join(base_path1).join("bar").join("barrr");
66
66
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -71,7 +71,7 @@ error: `format!(..)` used to form `PathBuf`
71
71
LL | PathBuf::from(format!("foo/foooo/{base_path1}/bar/barrr/{base_path2}"));
72
72
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
73
|
74
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
74
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
75
75
|
76
76
LL | Path::new("foo").join("foooo").join(base_path1).join("bar").join("barrr").join(base_path2);
77
77
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -82,7 +82,7 @@ error: `format!(..)` used to form `PathBuf`
82
82
LL | PathBuf::from(format!("{base_path2}/foo/{base_path1}/bar"));
83
83
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
84
|
85
- help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
85
+ help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
86
86
|
87
87
LL | Path::new(base_path2).join("foo").join(base_path1).join("bar");
88
88
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -93,15 +93,15 @@ error: `format!(..)` used to form `PathBuf`
93
93
LL | PathBuf::from(format!("foo/{base_path1}a/bar"));
94
94
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95
95
|
96
- = note: if it fits your use case, you may want to consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
96
+ = note: if it fits your use case, you may want to consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
97
97
98
98
error: `format!(..)` used to form `PathBuf`
99
99
--> $DIR/path_from_format.rs:17:5
100
100
|
101
101
LL | PathBuf::from(format!("foo/a{base_path1}/bar"));
102
102
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
103
|
104
- = note: if it fits your use case, you may want to consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability.
104
+ = note: if it fits your use case, you may want to consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
105
105
106
106
error: aborting due to 10 previous errors
107
107
0 commit comments