JuliOS/src/utils/serialize.rs
Julien CLEMENT 43eec9621c
All checks were successful
continuous-integration/drone/push Build is passing
cargo-fmt
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
2022-12-23 20:07:46 +01:00

5 lines
140 B
Rust

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