about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorWaffle <waffle.lapkin@gmail.com>2021-02-03 01:56:51 +0300
committerWaffle <waffle.lapkin@gmail.com>2021-02-03 01:56:51 +0300
commitcd6dad641ca635f0c71d7dd0a34de8211939e8d9 (patch)
tree624c515f6e7b3808ee5ea5ec88b7993d824bd29f /library/std/src/sys/unix/stack_overflow.rs
parent3182375e064b8fa90437aee1465bccafd8187d89 (diff)
downloadrust-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