aboutsummaryrefslogtreecommitdiffstats
path: root/rust/build_error.rs
diff options
context:
space:
mode:
authorMiguel Ojeda <[email protected]>2022-11-10 16:41:25 +0000
committerMiguel Ojeda <[email protected]>2022-12-04 00:59:15 +0000
commitfeadd062871704b1de2111d06008ee24a8f03d02 (patch)
tree105dd87b80eff06d37c904f60a9b905e26229c76 /rust/build_error.rs
parentrust: alloc: add `RawVec::try_with_capacity_in()` constructor (diff)
downloadkernel-feadd062871704b1de2111d06008ee24a8f03d02.tar.gz
kernel-feadd062871704b1de2111d06008ee24a8f03d02.zip
rust: alloc: add `Vec::try_with_capacity{,_in}()` constructors
Add `Vec::try_with_capacity()` and `Vec::try_with_capacity_in()` as the fallible versions of `Vec::with_capacity()` and `Vec::with_capacity_in()`, respectively. The implementations follow the originals and use the previously added `RawVec::try_with_capacity_in()`. In turn, `Vec::try_with_capacity()` will be used to implement the `CString` type (which wraps a `Vec<u8>`) in a later patch. Reviewed-by: Gary Guo <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/build_error.rs')
0 files changed, 0 insertions, 0 deletions