summaryrefslogtreecommitdiff
path: root/samples/rust/rust_configfs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'samples/rust/rust_configfs.rs')
-rw-r--r--samples/rust/rust_configfs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/rust/rust_configfs.rs b/samples/rust/rust_configfs.rs
index af04bfa35cb2..0ccc7553ef39 100644
--- a/samples/rust/rust_configfs.rs
+++ b/samples/rust/rust_configfs.rs
@@ -5,7 +5,7 @@
use kernel::alloc::flags;
use kernel::c_str;
use kernel::configfs;
-use kernel::configfs_attrs;
+use kernel::configfs::configfs_attrs;
use kernel::new_mutex;
use kernel::page::PAGE_SIZE;
use kernel::prelude::*;
@@ -94,7 +94,7 @@ impl configfs::AttributeOperations<0> for Configuration {
fn show(container: &Configuration, page: &mut [u8; PAGE_SIZE]) -> Result<usize> {
pr_info!("Show message\n");
- let data = container.message;
+ let data = container.message.to_bytes();
page[0..data.len()].copy_from_slice(data);
Ok(data.len())
}