diff options
| author | Miguel Ojeda <[email protected]> | 2022-11-10 16:41:24 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2022-12-04 00:59:15 +0000 |
| commit | 51d3a25ab3a4f1dd701b17f7340e36de8600e41e (patch) | |
| tree | b6634dc784239392b89db497403a7ac63ad1b956 /rust/alloc/vec/mod.rs | |
| parent | rust: prelude: add `error::code::*` constant items (diff) | |
| download | kernel-51d3a25ab3a4f1dd701b17f7340e36de8600e41e.tar.gz kernel-51d3a25ab3a4f1dd701b17f7340e36de8600e41e.zip | |
rust: alloc: add `RawVec::try_with_capacity_in()` constructor
Add the `RawVec::try_with_capacity_in()` constructor as the fallible
version of `RawVec::with_capacity_in()`.
The implementation follows the original.
The infallible constructor is implemented in terms of the private
`RawVec::allocate_in()` constructor, thus also add the private
`RawVec::try_allocate_in()` constructor following the other.
It will be used to implement `Vec::try_with_capacity{,_in}()` in
the next patch.
Reviewed-by: Gary Guo <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/alloc/vec/mod.rs')
0 files changed, 0 insertions, 0 deletions
