This trait is automatically implemented for any type that implements the Display trait. As
such, ToLine shouln’t be implemented directly: Display should be implemented instead, and
you get the ToLine implementation for free.
In this implementation, the to_line method panics if the Display implementation returns an
error. This indicates an incorrect Display implementation since fmt::Write for String never
returns an error itself.