{"push_id":620275861,"size":5,"distinct_size":0,"ref":"refs/heads/auto","head":"92d07856b5a5fbb9eca4606d0dc19ac90601eba8","before":"ed3b7b3b51685bdc127e55c2937feff137c674ca","commits":[{"sha":"45c10db41f2af5919621ff69f5dc090cc917c1d3","author":{"email":"4214fcc78ec77c101c4b11989256e557459f0535@gmail.com","name":"bcoopers"},"message":"Clarified and simplified algorithm for increasing size of buffer in\nread_to_end()","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/45c10db41f2af5919621ff69f5dc090cc917c1d3"},{"sha":"2982fe39ad93e29709a2e1414a4228718c8de28a","author":{"email":"4214fcc78ec77c101c4b11989256e557459f0535@gmail.com","name":"bcoopers"},"message":"80 character line limit","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/2982fe39ad93e29709a2e1414a4228718c8de28a"},{"sha":"8d3e55908ae0e51f04c170133c9f9739886b8e2e","author":{"email":"4214fcc78ec77c101c4b11989256e557459f0535@gmail.com","name":"bcoopers"},"message":"Clearer wording","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/8d3e55908ae0e51f04c170133c9f9739886b8e2e"},{"sha":"240734c31e529557583a0dc8e97abf858b4a375d","author":{"email":"4214fcc78ec77c101c4b11989256e557459f0535@gmail.com","name":"bcoopers"},"message":"Only zero at most 64k at a time.  We still use the doubling\nreallocation strategy since extend() calls reserve() and/or\npush() for us.","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/240734c31e529557583a0dc8e97abf858b4a375d"},{"sha":"92d07856b5a5fbb9eca4606d0dc19ac90601eba8","author":{"email":"3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","name":"bors"},"message":"Auto merge of #23847 - bcoopers:read_clarification, r=sfackler\n\nThis introduces no functional changes except for reducing a few unnecessary operations and variables.  Vec has the behavior that, if you request space past the capacity with reserve(), it will round up to the nearest power of 2.  What that effectively means is that after the first call to reserve(16), we are doubling our capacity every time.  So using the DEFAULT_BUF_SIZE and doubling cap_size() here is meaningless and has no effect on the call to reserve().\r\n\r\nNote that with #23842 implemented this will hopefully have a clearer API and less of a need for commenting.  If #23842 is not implemented then the most clear implementation would be to call reserve_exact(buf.capacity()) at every step (and making sure that buf.capacity() is not zero at the beginning of the function of course).\r\n\r\nEdit- functional change now introduced.  We will now zero 16 bytes of the vector first, then double to 32, then 64, etc. until we read 64kB.  This stops us from zeroing the entire vector when we double it, some of which may be wasted work.  Reallocation still follows the doubling strategy, but the responsibility has been moved to vec.extend(), which calls reserve() and push_back().","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/92d07856b5a5fbb9eca4606d0dc19ac90601eba8"}]}