Re: [RFC v2 19/20] rust: allow extracting the buffer from a CString

From: Alice Ryhl
Date: Thu Feb 27 2025 - 02:53:10 EST


On Thu, Feb 27, 2025 at 4:12 AM Alistair Francis <alistair@xxxxxxxxxxxxx> wrote:
>
> The kernel CString is a wrapper aroud a KVec. This patch allows
> retrieving the underlying buffer and consuming the CString. This allows
> users to create a CString from a string and then retrieve the underlying
> buffer.
>
> Signed-off-by: Alistair Francis <alistair@xxxxxxxxxxxxx>

I believe the idiomatic naming for a method like this is `into_vec`.

Alice