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;
1212static mut RESOURCE_TYPES : OnceLock < HashMap < TypeId , usize > > = OnceLock :: new ( ) ;
1313
1414/// Register an Erlang resource type handle for a particular type given by its `TypeId`
15+ #[ allow( static_mut_refs) ]
1516pub ( crate ) unsafe fn register_resource_type ( type_id : TypeId , resource_type : NifResourcePtr ) {
1617 RESOURCE_TYPES . get_or_init ( Default :: default) ;
1718 RESOURCE_TYPES
@@ -64,6 +65,7 @@ pub trait Resource: Sized + Send + Sync + 'static {
6465#[ doc( hidden) ]
6566pub ( crate ) trait ResourceExt : ' static {
6667 /// Get the NIF resource type handle for this type if it had been registered before
68+ #[ allow( static_mut_refs) ]
6769 fn get_resource_type ( ) -> Option < NifResourcePtr > {
6870 let map = unsafe { RESOURCE_TYPES . get ( ) ? } ;
6971 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) {
1010 DYN_NIF_CALLBACKS = callbacks;
1111}
1212
13+ #[ allow( static_mut_refs) ]
1314pub unsafe fn internal_write_symbols ( ) {
1415 let filler = nif_filler:: new ( ) ;
1516 DYN_NIF_CALLBACKS . write_symbols ( filler) ;
You can’t perform that action at this time.
0 commit comments