1
1
error: `format!(..)` used to form `PathBuf`
2
2
--> $DIR/paths_from_format.rs:8:5
3
3
|
4
- LL | PathBuf::from(format!("{}/foo/bar", base_path1 ));
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4
+ LL | PathBuf::from(format!("{base_path1 }/foo/bar"));
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
= note: `-D clippy::paths-from-format` implied by `-D warnings`
8
8
help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
@@ -13,8 +13,8 @@ LL | Path::new(&base_path1).join("foo").join("bar");
13
13
error: `format!(..)` used to form `PathBuf`
14
14
--> $DIR/paths_from_format.rs:9:5
15
15
|
16
- LL | PathBuf::from(format!("/foo/bar/{}", base_path1 ));
17
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16
+ LL | PathBuf::from(format!("/foo/bar/{base_path1}" ));
17
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
|
19
19
help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
20
20
|
@@ -24,8 +24,8 @@ LL | Path::new("/").join("foo").join("bar").join(&base_path1);
24
24
error: `format!(..)` used to form `PathBuf`
25
25
--> $DIR/paths_from_format.rs:10:5
26
26
|
27
- LL | PathBuf::from(format!("/foo/{}/bar", base_path1 ));
28
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
+ LL | PathBuf::from(format!("/foo/{base_path1 }/bar"));
28
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
29
|
30
30
help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
31
31
|
@@ -35,8 +35,8 @@ LL | Path::new("/").join("foo").join(&base_path1).join("bar");
35
35
error: `format!(..)` used to form `PathBuf`
36
36
--> $DIR/paths_from_format.rs:11:5
37
37
|
38
- LL | PathBuf::from(format!("foo/{}/bar", base_path1 ));
39
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
+ LL | PathBuf::from(format!("foo/{base_path1 }/bar"));
39
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
40
|
41
41
help: consider using `Path::new()` and `.join()` to make it OS-agnostic and improve code readability
42
42
|
0 commit comments