mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
rt::io: Use vec::reserve_additional
This commit is contained in:
parent
90dc9512ba
commit
6e538edea2
@ -303,7 +303,7 @@ impl<T: Reader> ReaderUtil for T {
|
||||
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