We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45c10db commit 2982fe3Copy full SHA for 2982fe3
src/libstd/io/mod.rs
@@ -106,8 +106,9 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize>
106
loop {
107
if len == buf.len() {
108
if buf.capacity() == buf.len() {
109
- // reserve() rounds up our request to the nearest power of two, so after the first
110
- // time the capacity is exceeded, we double our capacity at each call to reserve.
+ // reserve() rounds up our request to the nearest power of two,
+ // so after the first time the capacity is exceeded, we double
111
+ // our capacity at each call to reserve.
112
buf.reserve(min_cap_bump);
113
}
114
let new_area = buf.capacity() - buf.len();
0 commit comments