Open
Description
Crates | std |
Section | 16.2 String Parsing |
Given a simple custom type, implement debug and display directly. Do not lean on derive. Similar to this: https://doc.rust-lang.org/1.6.0/std/fmt/trait.Display.html#examples
It is OK for the cookbook to have similar examples to other sources, as this may be the first place someone looks to solve this problem. Do not use an x,y point as the example though. Mixed data types would be ideal.
Let's throw Hash on the sample too.