mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 03:53:20 +00:00
16 lines
494 B
Text
16 lines
494 B
Text
error: direct implementation of `ToString`
|
|
--> $DIR/to_string_trait_impl.rs:10:1
|
|
|
|
|
LL | / impl ToString for Point {
|
|
LL | | fn to_string(&self) -> String {
|
|
LL | | format!("({}, {})", self.x, self.y)
|
|
LL | | }
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= help: prefer implementing `Display` instead
|
|
= note: `-D clippy::to-string-trait-impl` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::to_string_trait_impl)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|