How to pretty-print in Rust
Today, I accidentally found out that instead of using {:?} to debug print, if
one just adds an extra # like {:#?} the variable is pretty printed.
This makes sense for struct rather than simple data types like numbers or
strings.
The interesting part (for me at least) is how I “discovered” it ๐
When I was printing a struct (for debugging ๐) VS Code (I think rust analyzer plugin) showed a popup how the struct does not implement Display
1