-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust: add to_str
and as_str_unchecked
to CStr
#533
Conversation
A couple more nits:
|
Hi, I would like to run the unit-tests in your patch. I have a VM running the kernel with Rust and loading the modules implemented with Rust. |
Following the `std::ffi::CStr` pattern of `to_str`, this adds methods to convert CStr to &str both safely and unsafely Signed-off-by: Milan Landaverde <[email protected]>
Co-authored-by: Miguel Ojeda <[email protected]> Signed-off-by: Milan Landaverde <[email protected]>
For to_str & as_str_unchecked Signed-off-by: Milan Landaverde <[email protected]>
From @ojeda
Went ahead and added these
Updated this commit message as well |
From @gurugio
Hello! I've been running the tests with |
Looks good to me! Thanks for contributing! |
Following the
std::ffi::CStr
pattern ofto_str
, this addsmethods to convert between CStr and &str both safely and unsafely
Closes #532
Signed-off-by: Milan Landaverde [email protected]