mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
e6f1f04e52
RawVec: don't recompute capacity after allocating. Currently it sets the capacity to `ptr.len() / mem::size_of::<T>()` after any buffer allocation/reallocation. This would be useful if allocators ever returned a `NonNull<[u8]>` with a size larger than requested. But this never happens, so it's not useful. Removing this slightly reduces the size of generated LLVM IR, and slightly speeds up the hot path of `RawVec` growth. r? `@ghost` |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml |