From: Miguel Ojeda Date: Sun, 19 Oct 2025 20:13:49 +0000 (+0200) Subject: samples: rust: debugfs: use `core::ffi::CStr` method names X-Git-Tag: v6.19-rc1~175^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b0c32cbed761335b0fa7f3db232ad69bc23ce69;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/samples/rust/rust_debugfs_scoped.rs b/samples/rust/rust_debugfs_scoped.rs index b0c4e76b123ea..eb870e9986b83 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(()) }