Skip to content

Commit 7b0c32c

Browse files
committed
samples: rust: debugfs: use core::ffi::CStr method names
Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by avoiding methods that only exist on the latter. This backslid in commit d4a5d39 ("samples: rust: Add scoped debugfs sample driver"). Link: https://patch.msgid.link/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 3f0dd5f commit 7b0c32c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/rust/rust_debugfs_scoped.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn remove_file_write(
3838
mod_data
3939
.devices
4040
.lock()
41-
.retain(|device| device.name.as_bytes() != to_remove.as_bytes());
41+
.retain(|device| device.name.to_bytes() != to_remove.to_bytes());
4242
Ok(())
4343
}
4444

0 commit comments

Comments
 (0)