about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbcoopers <coopersmithbrian@gmail.com>2015-03-29 19:29:11 -0400
committerbcoopers <coopersmithbrian@gmail.com>2015-03-29 19:29:11 -0400
commit8d3e55908ae0e51f04c170133c9f9739886b8e2e (patch)
treef8f66ca6d83768ea1ca939a6b2c3b901d955011d /src/libstd
parent2982fe39ad93e29709a2e1414a4228718c8de28a (diff)
downloadrust-8d3e55908ae0e51f04c170133c9f9739886b8e2e.tar.gz
rust-8d3e55908ae0e51f04c170133c9f9739886b8e2e.zip
Clearer wording
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index bc3791b99d0..c4ec2a7ca17 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -106,9 +106,9 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize>
     loop {
         if len == buf.len() {
             if buf.capacity() == buf.len() {
-                // reserve() rounds up our request to the nearest power of two,
-                // so after the first time the capacity is exceeded, we double
-                // our capacity at each call to reserve. 
+                // reserve() rounds up our request such that every request
+                // (with maybe the exception of the first request) for the
+                // same amount of space doubles our capacity.
                 buf.reserve(min_cap_bump);
             }
             let new_area = buf.capacity() - buf.len();