Skip to content

Commit 29724e2

Browse files
author
bcoopers
committed
---
yaml --- r: 196247 b: refs/heads/tmp c: 8d3e559 h: refs/heads/master i: 196245: 366d55b 196243: c603c1b 196239: c2b05c1 v: v3
1 parent 897096e commit 29724e2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 9854143cba679834bc4ef932858cd5303f015a0e
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: 2982fe39ad93e29709a2e1414a4228718c8de28a
35+
refs/heads/tmp: 8d3e55908ae0e51f04c170133c9f9739886b8e2e
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: 53a183f0274316596bf9405944d4f0468d8c93e4
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/libstd/io/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize>
106106
loop {
107107
if len == buf.len() {
108108
if buf.capacity() == buf.len() {
109-
// reserve() rounds up our request to the nearest power of two,
110-
// so after the first time the capacity is exceeded, we double
111-
// our capacity at each call to reserve.
109+
// reserve() rounds up our request such that every request
110+
// (with maybe the exception of the first request) for the
111+
// same amount of space doubles our capacity.
112112
buf.reserve(min_cap_bump);
113113
}
114114
let new_area = buf.capacity() - buf.len();

0 commit comments

Comments
 (0)