mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 13:16:31 +00:00
fix the panic error for riscv64 (#1123)
* fix the panic error for riscv64
This commit is contained in:
@ -124,11 +124,11 @@ static mut CASTER_MAP: Option<HashMap<(TypeId, TypeId), BoxedCaster, BuildFastHa
|
||||
#[cfg(target_os = "none")]
|
||||
#[allow(static_mut_refs)]
|
||||
pub fn caster_map() -> &'static HashMap<(TypeId, TypeId), BoxedCaster, BuildFastHasher> {
|
||||
return unsafe {
|
||||
unsafe {
|
||||
CASTER_MAP.as_ref().unwrap_or_else(|| {
|
||||
panic!("intertrait_caster_map() must be called after CASTER_MAP is initialized")
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Initializes the global [`CASTER_MAP`] with [`CASTERS`].
|
||||
|
Reference in New Issue
Block a user