rt::io: Use vec::reserve_additional
This commit is contained in:
parent
90dc9512ba
commit
6e538edea2
@ -303,7 +303,7 @@ fn push_bytes(&mut self, buf: &mut ~[u8], len: uint) {
|
||||
let start_len = buf.len();
|
||||
let mut total_read = 0;
|
||||
|
||||
buf.reserve_at_least(start_len + len);
|
||||
buf.reserve_additional(len);
|
||||
vec::raw::set_len(buf, start_len + len);
|
||||
|
||||
do (|| {
|
||||
|
Loading…
Reference in New Issue
Block a user