mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 15:50:05 +03:00
66388d9892
Replace `try_reserve_exact` with `try_with_capacity` in `std::fs::read` This change restores the previous behavior prior to #117925. That PR was made to handle OOM errors that turn into a panic with `Vec::with_capacity`. `try_reserve_exact` was used for that since there was no `try_with_capacity` method at the time. It was added later in #120504. I think it'd a better fit here.