From 7b0c32cbed761335b0fa7f3db232ad69bc23ce69 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sun, 19 Oct 2025 22:13:49 +0200 Subject: 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 d4a5d397c7fb ("samples: rust: Add scoped debugfs sample driver"). Link: https://patch.msgid.link/20251019213049.2060970-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda --- samples/rust/rust_debugfs_scoped.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples/rust/rust_debugfs_scoped.rs') diff --git a/samples/rust/rust_debugfs_scoped.rs b/samples/rust/rust_debugfs_scoped.rs index b0c4e76b123e..eb870e9986b8 100644 --- a/samples/rust/rust_debugfs_scoped.rs +++ b/samples/rust/rust_debugfs_scoped.rs @@ -38,7 +38,7 @@ fn remove_file_write( mod_data .devices .lock() - .retain(|device| device.name.as_bytes() != to_remove.as_bytes()); + .retain(|device| device.name.to_bytes() != to_remove.to_bytes()); Ok(()) } -- cgit v1.2.3