rust/library/alloc
Waffle cd6dad641c Make Vec::split_at_spare_mut public
This commit introduces a new method to the public API, under
`vec_split_at_spare` feature gate:

```rust
impl<T, A: Allocator> impl Vec<T, A> {
    pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>]);
}
```

The method returns 2 slices, one slice references the content of the vector,
and the other references the remaining spare capacity.

The method was previously implemented while adding `Vec::extend_from_within`,
and used to implement `Vec::spare_capacity_mut` (as the later is just a
subset of former one).
2021-02-03 01:56:51 +03:00
..
benches Reorder benches const variable 2020-09-29 21:39:24 +08:00
src Make Vec::split_at_spare_mut public 2021-02-03 01:56:51 +03:00
tests Auto merge of #79015 - WaffleLapkin:vec_append_from_within, r=KodrAus 2021-02-02 09:12:53 +00:00
Cargo.toml Update compiler_builtins to 0.1.39 2021-01-07 16:16:36 +09:00