Skip to content

Commit 0f6d225

Browse files
tamirdojeda
authored andcommitted
rust: str: remove unnecessary qualification
`core::ffi::*` is in the prelude, which is imported here. Signed-off-by: Tamir Duberstein <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 386f285 commit 0f6d225

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/kernel/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl CStr {
232232
/// last at least `'a`. When `CStr` is alive, the memory pointed by `ptr`
233233
/// must not be mutated.
234234
#[inline]
235-
pub unsafe fn from_char_ptr<'a>(ptr: *const crate::ffi::c_char) -> &'a Self {
235+
pub unsafe fn from_char_ptr<'a>(ptr: *const c_char) -> &'a Self {
236236
// SAFETY: The safety precondition guarantees `ptr` is a valid pointer
237237
// to a `NUL`-terminated C string.
238238
let len = unsafe { bindings::strlen(ptr) } + 1;
@@ -295,7 +295,7 @@ impl CStr {
295295

296296
/// Returns a C pointer to the string.
297297
#[inline]
298-
pub const fn as_char_ptr(&self) -> *const crate::ffi::c_char {
298+
pub const fn as_char_ptr(&self) -> *const c_char {
299299
self.0.as_ptr()
300300
}
301301

0 commit comments

Comments
 (0)