Skip to content

Commit d4af625

Browse files
authored
feat: remove ptr_metadata to remove all nightly feature (#16)
Signed-off-by: Woshiluo Luo <[email protected]>
1 parent eb0e525 commit d4af625

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/de.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ where
7878

7979
let total_size = u32::from_be(header.total_size);
8080
let raw_data_len = (total_size - HEADER_LEN) as usize;
81-
let ans_ptr = core::ptr::from_raw_parts(ptr, raw_data_len);
81+
let ans_ptr = core::ptr::slice_from_raw_parts(ptr, raw_data_len);
82+
let ans_ptr = ans_ptr as *const DeviceTree;
8283
let device_tree: &DeviceTree = &*ans_ptr;
8384
let tags = device_tree.tags();
8485
let mut d = Deserializer {

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
//! one with no-std support,
1313
//! the other one doesn't even need alloc.
1414
15-
#![feature(ptr_metadata)]
1615
#![cfg_attr(not(feature = "std"), no_std)]
1716

1817
#[cfg(feature = "alloc")]

0 commit comments

Comments
 (0)