Skip to content

Commit d5539ff

Browse files
author
bcoopers
committed
---
yaml --- r: 196020 b: refs/heads/beta c: 8d3e559 h: refs/heads/master v: v3
1 parent da7ea5f commit d5539ff

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
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3030
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3131
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32-
refs/heads/beta: 2982fe39ad93e29709a2e1414a4228718c8de28a
32+
refs/heads/beta: 8d3e55908ae0e51f04c170133c9f9739886b8e2e
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3535
refs/heads/tmp: 9de34a84bb300bab1bf0227f577331620cd60511

branches/beta/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)