mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
6ac0ba3c3a
We needed a more efficient way to zerofill the vector in read_to_end. This to reduce the memory intialization overhead to a minimum. Use the implementation of `std::vec::from_elem` (used for the vec![] macro) for Vec::resize as well. For simple element types like u8, this compiles to memset, so it makes Vec::resize much more efficient.