2022-05-05 14:12:52 +00:00
|
|
|
error: `format!(..)` appended to existing `String`
|
|
|
|
--> $DIR/format_push_string.rs:5:5
|
|
|
|
|
|
|
|
|
LL | string += &format!("{:?}", 1234);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `write!` to avoid the extra allocation
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::format-push-string` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::format_push_string)]`
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
error: `format!(..)` appended to existing `String`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/format_push_string.rs:7:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | string.push_str(&format!("{:?}", 5678));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `write!` to avoid the extra allocation
|
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: `format!(..)` appended to existing `String`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/format_push_string.rs:15:13
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | / hex += &(if upper {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2023-07-02 12:35:19 +00:00
|
|
|
LL | | format!("{byte:02X}")
|
|
|
|
LL | | } else {
|
|
|
|
LL | | format!("{byte:02x}")
|
|
|
|
LL | | });
|
|
|
|
| |______________^
|
|
|
|
|
|
|
|
|
= help: consider using `write!` to avoid the extra allocation
|
|
|
|
|
|
|
|
error: `format!(..)` appended to existing `String`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/format_push_string.rs:28:9
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | / s += &(if let Some(_a) = Some(1234) {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2023-07-02 12:35:19 +00:00
|
|
|
LL | | format!("{}", 1234)
|
|
|
|
LL | | } else {
|
|
|
|
LL | | format!("{}", 1234)
|
|
|
|
LL | | });
|
|
|
|
| |__________^
|
|
|
|
|
|
|
|
|
= help: consider using `write!` to avoid the extra allocation
|
|
|
|
|
|
|
|
error: `format!(..)` appended to existing `String`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/format_push_string.rs:35:9
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | / s += &(match Some(1234) {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
2023-07-02 12:35:19 +00:00
|
|
|
LL | | Some(_) => format!("{}", 1234),
|
|
|
|
LL | | None => format!("{}", 1234),
|
|
|
|
LL | | });
|
|
|
|
| |__________^
|
|
|
|
|
|
|
|
|
= help: consider using `write!` to avoid the extra allocation
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2022-05-05 14:12:52 +00:00
|
|
|
|