make eqv happy :)
This commit is contained in:
parent
617539425d
commit
4cccdf1378
@ -39,3 +39,4 @@ xxhash-rust = { version = "0.8.0", features = ["xxh3"] } # xxh3 hashing for rust
|
|||||||
serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib
|
serde = { version = "1.0", default-features = false, features = ["alloc"] } # serialization lib
|
||||||
erased-serde = "0.3.12"
|
erased-serde = "0.3.12"
|
||||||
postcard = { version = "0.5.1", features = ["alloc"] } # no_std compatible serde serialization fromat
|
postcard = { version = "0.5.1", features = ["alloc"] } # no_std compatible serde serialization fromat
|
||||||
|
static_assertions = "1.1.0"
|
||||||
|
@ -7,6 +7,9 @@ Welcome to libAFL
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
extern crate static_assertions;
|
||||||
|
|
||||||
pub mod corpus;
|
pub mod corpus;
|
||||||
pub mod engines;
|
pub mod engines;
|
||||||
pub mod events;
|
pub mod events;
|
||||||
|
@ -7,10 +7,12 @@ use core::any::{Any, TypeId};
|
|||||||
// yolo
|
// yolo
|
||||||
|
|
||||||
pub fn pack_type_id(id: u64) -> TypeId {
|
pub fn pack_type_id(id: u64) -> TypeId {
|
||||||
|
assert_eq_size!(TypeId, u64);
|
||||||
unsafe { *(&id as *const u64 as *const TypeId) }
|
unsafe { *(&id as *const u64 as *const TypeId) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unpack_type_id(id: TypeId) -> u64 {
|
pub fn unpack_type_id(id: TypeId) -> u64 {
|
||||||
|
assert_eq_size!(TypeId, u64);
|
||||||
unsafe { *(&id as *const _ as *const u64) }
|
unsafe { *(&id as *const _ as *const u64) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user