Skip to content

Commit 881961b

Browse files
author
bcoopers
committed
---
yaml --- r: 195544 b: refs/heads/master c: 8d3e559 h: refs/heads/master v: v3
1 parent c079f3d commit 881961b

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2982fe39ad93e29709a2e1414a4228718c8de28a
2+
refs/heads/master: 8d3e55908ae0e51f04c170133c9f9739886b8e2e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b3317d68910900f135f9f38e43a7a699bc736b4a
55
refs/heads/try: 961e0358e1a5c0faaef606e31e9965742c1643bf

trunk/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)