linux/rust
Miguel Ojeda 51d3a25ab3 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 <gary@garyguo.net>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-12-04 01:59:15 +01:00
..
alloc rust: alloc: add RawVec::try_with_capacity_in() constructor 2022-12-04 01:59:15 +01:00
bindings rust: add bindings crate 2022-09-28 08:58:00 +02:00
kernel rust: prelude: add error::code::* constant items 2022-12-04 01:59:15 +01:00
macros rust: macros: take string literals in module! 2022-12-04 01:59:15 +01:00
.gitignore Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
bindgen_parameters Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
compiler_builtins.rs rust: add compiler_builtins crate 2022-09-28 08:58:00 +02:00
exports.c rust: export generated symbols 2022-09-28 08:59:52 +02:00
helpers.c rust: add C helpers 2022-09-28 08:56:43 +02:00
Makefile Kbuild: add Rust support 2022-09-28 09:02:20 +02:00