4 ms·
It might help you to remember that the syntax is `{identifier:flags}` where identifier being left blank signifies a positional argument to the formatting macro.
by nicoburns 5y ago
It might help you to remember that the syntax is `{identifier:flags}` where identifier being left blank signifies a positional argument to the formatting macro. Although if it's the specific flags you're having trouble remembering, I can't help you as I can't remember them either except `?` (debug print) and `#?` (pretty debug print).
- nindalf 5y agoThanks Nico!
- 1f60c 5y agoA little hack: if you know the C-style format string you want to use, use that. The build will fail, of course, but Rust will tell you what to use instead.
- estebank 5y agoEven more: those suggestions that you see when calling cargo/rustc? They are also applicable through a tooltip with rust-analyzer. rustc has json output where the substitutions are represented in a machine-friendly format. :)