JuliOS/src/utils/serialize.rs

7 lines
175 B
Rust
Raw Normal View History

pub fn unserialize<T>(mapping: &u8) -> &T {
let ptr: *const u8 = mapping;
let path_table_ptr: *const T = ptr as *const T;
unsafe {
&*path_table_ptr
}
}