11error: useless use of `format!`
2- --> $DIR/format.rs:20 :5
2+ --> $DIR/format.rs:19 :5
33 |
44LL | format!("foo");
55 | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
@@ -8,19 +8,19 @@ LL | format!("foo");
88 = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
99
1010error: useless use of `format!`
11- --> $DIR/format.rs:21 :5
11+ --> $DIR/format.rs:20 :5
1212 |
1313LL | format!("{{}}");
1414 | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{}".to_string()`
1515
1616error: useless use of `format!`
17- --> $DIR/format.rs:22 :5
17+ --> $DIR/format.rs:21 :5
1818 |
1919LL | format!("{{}} abc {{}}");
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{} abc {}".to_string()`
2121
2222error: useless use of `format!`
23- --> $DIR/format.rs:23 :5
23+ --> $DIR/format.rs:22 :5
2424 |
2525LL | / format!(
2626LL | | r##"foo {{}}
@@ -35,67 +35,67 @@ LL ~ " bar"##.to_string();
3535 |
3636
3737error: useless use of `format!`
38- --> $DIR/format.rs:28 :13
38+ --> $DIR/format.rs:27 :13
3939 |
4040LL | let _ = format!("");
4141 | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
4242
4343error: useless use of `format!`
44- --> $DIR/format.rs:30 :5
44+ --> $DIR/format.rs:29 :5
4545 |
4646LL | format!("{}", "foo");
4747 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
4848
4949error: useless use of `format!`
50- --> $DIR/format.rs:38 :5
50+ --> $DIR/format.rs:37 :5
5151 |
5252LL | format!("{}", arg);
5353 | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
5454
5555error: useless use of `format!`
56- --> $DIR/format.rs:68 :5
56+ --> $DIR/format.rs:67 :5
5757 |
5858LL | format!("{}", 42.to_string());
5959 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
6060
6161error: useless use of `format!`
62- --> $DIR/format.rs:70 :5
62+ --> $DIR/format.rs:69 :5
6363 |
6464LL | format!("{}", x.display().to_string());
6565 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
6666
6767error: useless use of `format!`
68- --> $DIR/format.rs:74 :18
68+ --> $DIR/format.rs:73 :18
6969 |
7070LL | let _ = Some(format!("{}", a + "bar"));
7171 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
7272
7373error: useless use of `format!`
74- --> $DIR/format.rs:78 :22
74+ --> $DIR/format.rs:77 :22
7575 |
7676LL | let _s: String = format!("{}", &*v.join("\n"));
7777 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("\n")).to_string()`
7878
7979error: useless use of `format!`
80- --> $DIR/format.rs:84 :13
80+ --> $DIR/format.rs:83 :13
8181 |
8282LL | let _ = format!("{x}");
8383 | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
8484
8585error: useless use of `format!`
86- --> $DIR/format.rs:86 :13
86+ --> $DIR/format.rs:85 :13
8787 |
8888LL | let _ = format!("{y}", y = x);
8989 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
9090
9191error: useless use of `format!`
92- --> $DIR/format.rs:90 :13
92+ --> $DIR/format.rs:89 :13
9393 |
9494LL | let _ = format!("{abc}");
9595 | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `abc.to_string()`
9696
9797error: useless use of `format!`
98- --> $DIR/format.rs:92 :13
98+ --> $DIR/format.rs:91 :13
9999 |
100100LL | let _ = format!("{xx}");
101101 | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `xx.to_string()`
0 commit comments