summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2025-10-19 22:13:49 +0200
committerMiguel Ojeda <ojeda@kernel.org>2025-10-20 04:04:23 +0200
commit7b0c32cbed761335b0fa7f3db232ad69bc23ce69 (patch)
tree0a2e09bba484770b992af4357b45aa462d8286bf
parent3f0dd5fad9ac275648bd7407f032a8b7adaf204f (diff)
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 <ojeda@kernel.org>
-rw-r--r--samples/rust/rust_debugfs_scoped.rs2
1 files changed, 1 insertions, 1 deletions
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(())
}