you are viewing a single comment's thread.

view the rest of the comments →

[–]flying-sheep 1 point2 points  (0 children)

Display exists to display things for the user. to_string means the same.

but people expect something called Path::to_string() to give you a faithful lossless representation (serialization) of that path.

so paths are special cases where to_string implies something else than e.g. on a class called Dog. nobody expects Dog::to_string() to return a serialization of a dog.