80 character line limit
This commit is contained in:
parent
45c10db41f
commit
2982fe39ad
1 changed files with 3 additions and 2 deletions
|
@ -106,8 +106,9 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize>
|
||||||
loop {
|
loop {
|
||||||
if len == buf.len() {
|
if len == buf.len() {
|
||||||
if buf.capacity() == buf.len() {
|
if buf.capacity() == buf.len() {
|
||||||
// reserve() rounds up our request to the nearest power of two, so after the first
|
// reserve() rounds up our request to the nearest power of two,
|
||||||
// time the capacity is exceeded, we double our capacity at each call to reserve.
|
// so after the first time the capacity is exceeded, we double
|
||||||
|
// our capacity at each call to reserve.
|
||||||
buf.reserve(min_cap_bump);
|
buf.reserve(min_cap_bump);
|
||||||
}
|
}
|
||||||
let new_area = buf.capacity() - buf.len();
|
let new_area = buf.capacity() - buf.len();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue