diff --git a/src/de.rs b/src/de.rs index 2998e4b..a5ff2c7 100644 --- a/src/de.rs +++ b/src/de.rs @@ -78,7 +78,8 @@ where let total_size = u32::from_be(header.total_size); let raw_data_len = (total_size - HEADER_LEN) as usize; - let ans_ptr = core::ptr::from_raw_parts(ptr, raw_data_len); + let ans_ptr = core::ptr::slice_from_raw_parts(ptr, raw_data_len); + let ans_ptr = ans_ptr as *const DeviceTree; let device_tree: &DeviceTree = &*ans_ptr; let tags = device_tree.tags(); let mut d = Deserializer { diff --git a/src/lib.rs b/src/lib.rs index c8d4452..e77b242 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,6 @@ //! one with no-std support, //! the other one doesn't even need alloc. -#![feature(ptr_metadata)] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "alloc")]