1
1
error: useless use of `format!`
2
- --> $DIR/format.rs:20 :5
2
+ --> $DIR/format.rs:19 :5
3
3
|
4
4
LL | format!("foo");
5
5
| ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
@@ -8,19 +8,19 @@ LL | format!("foo");
8
8
= help: to override `-D warnings` add `#[allow(clippy::useless_format)]`
9
9
10
10
error: useless use of `format!`
11
- --> $DIR/format.rs:21 :5
11
+ --> $DIR/format.rs:20 :5
12
12
|
13
13
LL | format!("{{}}");
14
14
| ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{}".to_string()`
15
15
16
16
error: useless use of `format!`
17
- --> $DIR/format.rs:22 :5
17
+ --> $DIR/format.rs:21 :5
18
18
|
19
19
LL | format!("{{}} abc {{}}");
20
20
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{} abc {}".to_string()`
21
21
22
22
error: useless use of `format!`
23
- --> $DIR/format.rs:23 :5
23
+ --> $DIR/format.rs:22 :5
24
24
|
25
25
LL | / format!(
26
26
LL | | r##"foo {{}}
@@ -35,67 +35,67 @@ LL ~ " bar"##.to_string();
35
35
|
36
36
37
37
error: useless use of `format!`
38
- --> $DIR/format.rs:28 :13
38
+ --> $DIR/format.rs:27 :13
39
39
|
40
40
LL | let _ = format!("");
41
41
| ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
42
42
43
43
error: useless use of `format!`
44
- --> $DIR/format.rs:30 :5
44
+ --> $DIR/format.rs:29 :5
45
45
|
46
46
LL | format!("{}", "foo");
47
47
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
48
48
49
49
error: useless use of `format!`
50
- --> $DIR/format.rs:38 :5
50
+ --> $DIR/format.rs:37 :5
51
51
|
52
52
LL | format!("{}", arg);
53
53
| ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
54
54
55
55
error: useless use of `format!`
56
- --> $DIR/format.rs:68 :5
56
+ --> $DIR/format.rs:67 :5
57
57
|
58
58
LL | format!("{}", 42.to_string());
59
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
60
60
61
61
error: useless use of `format!`
62
- --> $DIR/format.rs:70 :5
62
+ --> $DIR/format.rs:69 :5
63
63
|
64
64
LL | format!("{}", x.display().to_string());
65
65
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
66
66
67
67
error: useless use of `format!`
68
- --> $DIR/format.rs:74 :18
68
+ --> $DIR/format.rs:73 :18
69
69
|
70
70
LL | let _ = Some(format!("{}", a + "bar"));
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
72
72
73
73
error: useless use of `format!`
74
- --> $DIR/format.rs:78 :22
74
+ --> $DIR/format.rs:77 :22
75
75
|
76
76
LL | let _s: String = format!("{}", &*v.join("\n"));
77
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("\n")).to_string()`
78
78
79
79
error: useless use of `format!`
80
- --> $DIR/format.rs:84 :13
80
+ --> $DIR/format.rs:83 :13
81
81
|
82
82
LL | let _ = format!("{x}");
83
83
| ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
84
84
85
85
error: useless use of `format!`
86
- --> $DIR/format.rs:86 :13
86
+ --> $DIR/format.rs:85 :13
87
87
|
88
88
LL | let _ = format!("{y}", y = x);
89
89
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
90
90
91
91
error: useless use of `format!`
92
- --> $DIR/format.rs:90 :13
92
+ --> $DIR/format.rs:89 :13
93
93
|
94
94
LL | let _ = format!("{abc}");
95
95
| ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `abc.to_string()`
96
96
97
97
error: useless use of `format!`
98
- --> $DIR/format.rs:92 :13
98
+ --> $DIR/format.rs:91 :13
99
99
|
100
100
LL | let _ = format!("{xx}");
101
101
| ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `xx.to_string()`
0 commit comments