| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:7:5 | |
| | | |
| LL | string += &format!("{:?}", 1234); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| = note: `-D clippy::format-push-string` implied by `-D warnings` | |
| = help: to override `-D warnings` add `#[allow(clippy::format_push_string)]` | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string += &format!("{:?}", 1234); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:10:5 | |
| | | |
| LL | string.push_str(&format!("{:?}", 5678)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 5678)); | |
| LL + let _ = write!(string, "{:?}", 5678); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:18:5 | |
| | | |
| LL | string!().push_str(&format!("{:?}", 5678)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string!().push_str(&format!("{:?}", 5678)); | |
| LL + let _ = write!(string!(), "{:?}", 5678); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:30:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:39:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:48:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:57:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:66:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:73:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:84:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:93:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:102:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:111:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:120:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: `format!(..)` appended to existing `String` | |
| --> tests/ui/format_push_string.rs:127:17 | |
| | | |
| LL | string.push_str(&format!("{:?}", 1234)); | |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| | | |
| = note: you may need to import the `std::fmt::Write` trait | |
| help: consider using `write!` to avoid the extra allocation | |
| | | |
| LL - string.push_str(&format!("{:?}", 1234)); | |
| LL + let _ = write!(string, "{:?}", 1234); | |
| | | |
| error: aborting due to 15 previous errors | |