Re: [PATCH v2] rust: str: add conversion from `CStr` to `CString`

From: Miguel Ojeda
Date: Wed May 31 2023 - 13:10:12 EST

On Wed, May 3, 2023 at 4:10 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> These methods can be used to copy the data in a temporary c string into
> a separate allocation, so that it can be accessed later even if the
> original is deallocated.
> The API in this change mirrors the standard library API for the `&str`
> and `String` types. The `ToOwned` trait is not implemented because it
> assumes that allocations are infallible.
> Reviewed-by: Benno Lossin <benno.lossin@xxxxxxxxx>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Applied to `rust-next` -- thanks everyone!