@@ -5,7 +5,7 @@ LL | PathBuf::from(format!("{}/foo/bar", base_path1));
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 |
77 = 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
99 |
1010LL | Path::new(base_path1).join("foo").join("bar");
1111 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -16,7 +16,7 @@ error: `format!(..)` used to form `PathBuf`
1616LL | PathBuf::from(format!("/foo/bar/{}", base_path1));
1717 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818 |
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
2020 |
2121LL | Path::new("/").join("foo").join("bar").join(base_path1);
2222 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -27,7 +27,7 @@ error: `format!(..)` used to form `PathBuf`
2727LL | PathBuf::from(format!("/foo/{}/bar", base_path1));
2828 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2929 |
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
3131 |
3232LL | Path::new("/").join("foo").join(base_path1).join("bar");
3333 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -38,7 +38,7 @@ error: `format!(..)` used to form `PathBuf`
3838LL | PathBuf::from(format!("foo/{}/bar", base_path1));
3939 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040 |
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
4242 |
4343LL | Path::new("foo").join(base_path1).join("bar");
4444 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -49,7 +49,7 @@ error: `format!(..)` used to form `PathBuf`
4949LL | PathBuf::from(format!("foo/foooo/{base_path1}/bar/barrr"));
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5151 |
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
5353 |
5454LL | Path::new("foo").join("foooo").join(base_path1).join("bar").join("barrr");
5555 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -60,7 +60,7 @@ error: `format!(..)` used to form `PathBuf`
6060LL | PathBuf::from(format!("foo/foooo/{base_path1}/bar/barrr"));
6161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6262 |
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
6464 |
6565LL | Path::new("foo").join("foooo").join(base_path1).join("bar").join("barrr");
6666 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -71,7 +71,7 @@ error: `format!(..)` used to form `PathBuf`
7171LL | PathBuf::from(format!("foo/foooo/{base_path1}/bar/barrr/{base_path2}"));
7272 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7373 |
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
7575 |
7676LL | Path::new("foo").join("foooo").join(base_path1).join("bar").join("barrr").join(base_path2);
7777 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -82,7 +82,7 @@ error: `format!(..)` used to form `PathBuf`
8282LL | PathBuf::from(format!("{base_path2}/foo/{base_path1}/bar"));
8383 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8484 |
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
8686 |
8787LL | Path::new(base_path2).join("foo").join(base_path1).join("bar");
8888 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -93,15 +93,15 @@ error: `format!(..)` used to form `PathBuf`
9393LL | PathBuf::from(format!("foo/{base_path1}a/bar"));
9494 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9595 |
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
9797
9898error: `format!(..)` used to form `PathBuf`
9999 --> $DIR/path_from_format.rs:17:5
100100 |
101101LL | PathBuf::from(format!("foo/a{base_path1}/bar"));
102102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103103 |
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
105105
106106error: aborting due to 10 previous errors
107107
0 commit comments