mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
c143267901
Make # pretty print format easier to discover # Rationale: I use (cargo cult?) three formats in rust: `{}`, debug `{:?}`, and pretty-print debug `{:#?}`. I discovered `{:#?}` in some blog post or guide when I started working in Rust. While `#` is documented I think it is hard to discover. So taking the good advice of ```@carols10cents``` I am trying to improve the docs with a PR As a reminder "pretty print" means that where `{:?}` will print something like ``` foo: { b1: 1, b2: 2} ``` `{:#?}` will prints something like ``` foo { b1: 1 b2: 3 } ``` # Changes Add an example to `fmt` to try and make it easier to discover `#` |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |