Searched hist:feadd062 (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/rust/alloc/ |
H A D | raw_vec.rs | feadd062 Thu Nov 10 10:41:25 CST 2022 Miguel Ojeda <ojeda@kernel.org> 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 <gary@garyguo.net> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
|
/openbmc/linux/rust/alloc/vec/ |
H A D | mod.rs | feadd062 Thu Nov 10 10:41:25 CST 2022 Miguel Ojeda <ojeda@kernel.org> 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 <gary@garyguo.net> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
|