rust/library/alloc
bors e6f1f04e52 Auto merge of #92220 - nnethercote:RawVec-dont-recompute-capacity, r=joshtriplett
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`
2021-12-24 01:54:56 +00:00
..
benches update vec::retain benchmarks 2021-12-04 16:20:35 +01:00
src Auto merge of #92220 - nnethercote:RawVec-dont-recompute-capacity, r=joshtriplett 2021-12-24 01:54:56 +00:00
tests Rollup merge of #88858 - spektom:to_lower_upper_rev, r=dtolnay 2021-12-23 00:28:51 +01:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00