]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #67021 - elichai:2019-12-fmt, r=QuietMisdreavus
authorYuki Okushi <huyuumi.dev@gmail.com>
Fri, 6 Dec 2019 06:37:10 +0000 (15:37 +0900)
committerGitHub <noreply@github.com>
Fri, 6 Dec 2019 06:37:10 +0000 (15:37 +0900)
Fix docs for formatting delegations

If you use the example in the docs right now it breaks all the options Formatters have to offer.
i.e. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=214392ecc6eff73b4789c32568395f72 this should've padded the output with 4 zeros but didn't.

with the new example it does work: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3bdfb29f395230c5129c5f56dcfcb2a9

The only thing i'm not quite sure about is what's the right way to do it in a loop (altough non of the docs talk about it people are doing it in the wild and there were a couple of attempts to include in libcore)
i.e. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4c4dca3c90ba36779ecd014f3899ab9c


Trivial merge