Files
Linux/rust/kernel
Alice Ryhl 66bd7533ef rust: str: add conversion from CStr to CString
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 <[email protected]>
Signed-off-by: Alice Ryhl <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
2023-05-31 18:53:10 +02:00
..
2023-05-31 17:35:03 +02:00
2023-05-31 17:35:03 +02:00
2023-05-31 17:35:03 +02:00
2023-04-22 00:20:00 +02:00
2023-05-31 17:35:03 +02:00
2023-04-22 01:46:45 +02:00
2023-04-22 00:20:00 +02:00
2023-04-22 00:20:00 +02:00