Omg, just discovered these handy `fmt::Formatter::debug_*` methods: doc.rust-lang.org/stable/std/fmt - why did I not know of these before?
Conversation
Wouldn't you normally just #[derive(Debug)] which IIRC uses those methods automagically?
1
If you want some quick-and-dirty custom pretty printing with support for formatted output - ie. `println!("{#}", foo)`, this is super handy.
Those methods are particularly useful because they ensure proper pretty-printed {:#?} output. (I wish it was the default and # the reverse.)
1


