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

-16
View File
@@ -27,14 +27,6 @@ struct IsoPathTable {
}
impl IsoPathTable {
pub fn from(mapping: &u8) -> &Self {
let ptr: *const u8 = mapping;
let path_table_ptr: *const Self = ptr as *const Self;
unsafe {
&*path_table_ptr
}
}
#[allow(unaligned_references)]
pub fn get_idf(&self) -> &[u8] {
unsafe {
@@ -77,14 +69,6 @@ pub struct IsoDir {
}
impl IsoDir {
pub fn from(mapping: &u8) -> &Self {
let ptr: *const u8 = mapping;
let path_table_ptr: *const Self = ptr as *const Self;
unsafe {
&*path_table_ptr
}
}
#[allow(unaligned_references)]
pub fn get_idf(&self) -> &[u8] {
unsafe {
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.