diff options
| author | Waffle <waffle.lapkin@gmail.com> | 2021-02-03 01:56:51 +0300 |
|---|---|---|
| committer | Waffle <waffle.lapkin@gmail.com> | 2021-02-03 01:56:51 +0300 |
| commit | cd6dad641ca635f0c71d7dd0a34de8211939e8d9 (patch) | |
| tree | 624c515f6e7b3808ee5ea5ec88b7993d824bd29f /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 3182375e064b8fa90437aee1465bccafd8187d89 (diff) | |
| download | rust-cd6dad641ca635f0c71d7dd0a34de8211939e8d9.tar.gz rust-cd6dad641ca635f0c71d7dd0a34de8211939e8d9.zip | |
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).
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
