refacto unserialize

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2022-12-19 20:25:52 +01:00
1 parent f567198f75
commit dcaea4454b
4 files changed
+11 -16

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
pub mod serialize;
pub use serialize::unserialize;
+7
View File
@@ -0,0 +1,7 @@
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
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.