auto merge of #18108 : mahkoh/rust/buffered_reader, r=alexcrichton
auto merge of #18108 : mahkoh/rust/buffered_reader, r=alexcrichton

This optimizes `read` for the case in which the number of bytes
requested is larger than the internal buffer. Note that the first
comparison occurs again right afterwards and should thus be free. The
second comparison occurs only in the cold branch.

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