File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type NifResourcePtr = *const ErlNifResourceType;
12
12
static mut RESOURCE_TYPES : OnceLock < HashMap < TypeId , usize > > = OnceLock :: new ( ) ;
13
13
14
14
/// Register an Erlang resource type handle for a particular type given by its `TypeId`
15
+ #[ allow( static_mut_refs) ]
15
16
pub ( crate ) unsafe fn register_resource_type ( type_id : TypeId , resource_type : NifResourcePtr ) {
16
17
RESOURCE_TYPES . get_or_init ( Default :: default) ;
17
18
RESOURCE_TYPES
@@ -64,6 +65,7 @@ pub trait Resource: Sized + Send + Sync + 'static {
64
65
#[ doc( hidden) ]
65
66
pub ( crate ) trait ResourceExt : ' static {
66
67
/// Get the NIF resource type handle for this type if it had been registered before
68
+ #[ allow( static_mut_refs) ]
67
69
fn get_resource_type ( ) -> Option < NifResourcePtr > {
68
70
let map = unsafe { RESOURCE_TYPES . get ( ) ? } ;
69
71
map. get ( & TypeId :: of :: < Self > ( ) )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ pub unsafe fn internal_set_symbols(callbacks: DynNifCallbacks) {
10
10
DYN_NIF_CALLBACKS = callbacks;
11
11
}
12
12
13
+ #[ allow( static_mut_refs) ]
13
14
pub unsafe fn internal_write_symbols ( ) {
14
15
let filler = nif_filler:: new ( ) ;
15
16
DYN_NIF_CALLBACKS . write_symbols ( filler) ;
You can’t perform that action at this time.
0 commit comments