This trait is automatically implemented for any type that implements the Display trait. As
such, ToText shouldn’t be implemented directly: Display should be implemented instead, and
you get the ToText implementation for free.
In this implementation, the to_text 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.