auto merge of #16601 : cybergeek94/rust/master, r=alexcrichton
auto merge of #16601 : cybergeek94/rust/master, r=alexcrichton

Previously, `PrettyEncoder` indented a magic constant of 2 spaces per level, which may be fine for most uses but in my use case I would like to allow the user to specify the indent step for the outputted JSON in my program.

This is small change that does not break any existing code whatsoever, and does not change the behavior of existing uses. `PrettyEncoder::new()` still uses the default of 2.

I couldn't think of any simple tests for this change. The obvious one would be to check the outputted JSON for the correct number of spaces per indent level, but I think that would be more complex than the actual change itself and test little besides correctness and consistency, which can be verified visually. There's already a test for correct parsing of pretty-printed JSON that should still pass with this change.

pelmers/rust,P1start/rust,ejjeong/rust,carols10cents/rust,GBGamer/rust,hauleth/rust,pelmers/rust,P1start/rust,dwillmer/rust,jroesch/rust,avdi/rust,mihneadb/rust,jbclements/rust,nwin/rust,zachwick/rust,hauleth/rust,aneeshusa/rust,victorvde/rust,P1start/rust,untitaker/rust,philyoon/rust,jashank/rust,aidancully/rust,aidancully/rust,l0kod/rust,zubron/rust,dwillmer/rust,untitaker/rust,rprichard/rust,mvdnes/rust,miniupnp/rust,erickt/rust,barosl/rust,krzysz00/rust,ktossell/rust,jashank/rust,victorvde/rust,robertg/rust,zachwick/rust,zachwick/rust,victorvde/rust,jbclements/rust,mvdnes/rust,hauleth/rust,aepsil0n/rust,emk/rust,mihneadb/rust,philyoon/rust,miniupnp/rust,bombless/rust,miniupnp/rust,0x73/rust,andars/rust,ruud-v-a/rust,sae-bom/rust,untitaker/rust,kwantam/rust,KokaKiwi/rust,dwillmer/rust,erickt/rust,richo/rust,barosl/rust,mahkoh/rust,jashank/rust,untitaker/rust,GBGamer/rust,mihneadb/rust,ejjeong/rust,sae-bom/rust,jbclements/rust,defuz/rust,jroesch/rust,barosl/rust,hauleth/rust,rohitjoshi/rust,ktossell/rust,KokaKiwi/rust,0x73/rust,seanrivera/rust,P1start/rust,zachwick/rust,aepsil0n/rust,rohitjoshi/rust,krzysz00/rust,cllns/rust,graydon/rust,miniupnp/rust,AerialX/rust-rt-minimal,nham/rust,aidancully/rust,mdinger/rust,hauleth/rust,kimroen/rust,KokaKiwi/rust,jroesch/rust,sae-bom/rust,andars/rust,untitaker/rust,ebfull/rust,avdi/rust,mahkoh/rust,ejjeong/rust,seanrivera/rust,robertg/rust,ebfull/rust,0x73/rust,jbclements/rust,vhbit/rust,jashank/rust,mdinger/rust,philyoon/rust,reem/rust,defuz/rust,nham/rust,gifnksm/rust,defuz/rust,reem/rust,reem/rust,0x73/rust,robertg/rust,gifnksm/rust,pshc/rust,P1start/rust,omasanori/rust,untitaker/rust,dinfuehr/rust,erickt/rust,mahkoh/rust,nwin/rust,omasanori/rust,defuz/rust,zubron/rust,hauleth/rust,AerialX/rust,erickt/rust,robertg/rust,emk/rust,miniupnp/rust,nham/rust,KokaKiwi/rust,rprichard/rust,seanrivera/rust,kimroen/rust,bombless/rust,emk/rust,gifnksm/rust,miniupnp/rust,0x73/rust,ruud-v-a/rust,victorvde/rust,TheNeikos/rust,kwantam/rust,ejjeong/rust,carols10cents/rust,zubron/rust,KokaKiwi/rust,carols10cents/rust,carols10cents/rust,mvdnes/rust,0x73/rust,dwillmer/rust,GBGamer/rust,pelmers/rust,zaeleus/rust,mahkoh/rust,zachwick/rust,barosl/rust,quornian/rust,krzysz00/rust,barosl/rust,AerialX/rust-rt-minimal,avdi/rust,AerialX/rust,ejjeong/rust,aidancully/rust,aepsil0n/rust,quornian/rust,nwin/rust,bombless/rust,carols10cents/rust,jroesch/rust,kwantam/rust,vhbit/rust,krzysz00/rust,emk/rust,l0kod/rust,vhbit/rust,rprichard/rust,jashank/rust,pshc/rust,zachwick/rust,mdinger/rust,ktossell/rust,mdinger/rust,mdinger/rust,gifnksm/rust,vhbit/rust,nham/rust,AerialX/rust-rt-minimal,philyoon/rust,bombless/rust,jroesch/rust,aepsil0n/rust,emk/rust,omasanori/rust,vhbit/rust,rprichard/rust,jbclements/rust,quornian/rust,ebfull/rust,AerialX/rust-rt-minimal,robertg/rust,jbclements/rust,mihneadb/rust,TheNeikos/rust,AerialX/rust,zubron/rust,erickt/rust,dwillmer/rust,jbclements/rust,rohitjoshi/rust,carols10cents/rust,reem/rust,ebfull/rust,l0kod/rust,ejjeong/rust,erickt/rust,aneeshusa/rust,aidancully/rust,GBGamer/rust,avdi/rust,robertg/rust,kwantam/rust,quornian/rust,omasanori/rust,ktossell/rust,jroesch/rust,richo/rust,victorvde/rust,aneeshusa/rust,GBGamer/rust,jroesch/rust,XMPPwocky/rust,TheNeikos/rust,pshc/rust,victorvde/rust,dinfuehr/rust,richo/rust,P1start/rust,kimroen/rust,dwillmer/rust,jashank/rust,GBGamer/rust,barosl/rust,defuz/rust,rprichard/rust,mvdnes/rust,dinfuehr/rust,KokaKiwi/rust,pshc/rust,nham/rust,kwantam/rust,reem/rust,zubron/rust,seanrivera/rust,cllns/rust,miniupnp/rust,TheNeikos/rust,XMPPwocky/rust,AerialX/rust-rt-minimal,emk/rust,dwillmer/rust,zaeleus/rust,sae-bom/rust,aepsil0n/rust,TheNeikos/rust,TheNeikos/rust,sae-bom/rust,mihneadb/rust,krzysz00/rust,rohitjoshi/rust,nham/rust,mahkoh/rust,AerialX/rust-rt-minimal,gifnksm/rust,bombless/rust,l0kod/rust,vhbit/rust,graydon/rust,nham/rust,pshc/rust,cllns/rust,vhbit/rust,erickt/rust,jroesch/rust,bombless/rust,ruud-v-a/rust,mvdnes/rust,jbclements/rust,jashank/rust,ruud-v-a/rust,kimroen/rust,XMPPwocky/rust,bombless/rust-docs-chinese,quornian/rust,nwin/rust,pelmers/rust,quornian/rust,mvdnes/rust,cllns/rust,aepsil0n/rust,l0kod/rust,avdi/rust,seanrivera/rust,richo/rust,kwantam/rust,zubron/rust,rohitjoshi/rust,barosl/rust,mihneadb/rust,graydon/rust,dinfuehr/rust,defuz/rust,graydon/rust,XMPPwocky/rust,aidancully/rust,omasanori/rust,pshc/rust,andars/rust,andars/rust,AerialX/rust,aneeshusa/rust,zubron/rust,l0kod/rust,rprichard/rust,reem/rust,dinfuehr/rust,GBGamer/rust,gifnksm/rust,AerialX/rust,richo/rust,mahkoh/rust,rohitjoshi/rust,nwin/rust,philyoon/rust,seanrivera/rust,emk/rust,ruud-v-a/rust,zaeleus/rust,ebfull/rust,cllns/rust,l0kod/rust,ebfull/rust,jbclements/rust,vhbit/rust,graydon/rust,zaeleus/rust,miniupnp/rust,graydon/rust,omasanori/rust,sae-bom/rust,jashank/rust,GBGamer/rust,kimroen/rust,ktossell/rust,nwin/rust,kimroen/rust,XMPPwocky/rust,mdinger/rust,XMPPwocky/rust,zaeleus/rust,0x73/rust,dinfuehr/rust,P1start/rust,krzysz00/rust,ktossell/rust,AerialX/rust,nwin/rust,andars/rust,quornian/rust,richo/rust,kimroen/rust,l0kod/rust,avdi/rust,pelmers/rust,nwin/rust,pshc/rust,pshc/rust,pelmers/rust,ruud-v-a/rust,aneeshusa/rust,zaeleus/rust,aneeshusa/rust,zubron/rust,ktossell/rust,andars/rust,dwillmer/rust,cllns/rust,philyoon/rust