@@ -137,13 +137,13 @@ impl<'heap, S: Allocator> PartialModuleRegistry<'heap, S> {
137137 ///
138138 /// [`insert_module`]: Self::insert_module
139139 #[ expect( unsafe_code) ]
140- pub fn finish ( self , heap : & ' heap Heap ) -> ModuleRegistry < ' heap > {
140+ pub fn finish ( self ) -> ModuleRegistry < ' heap > {
141141 assert ! (
142142 self . modules. iter( ) . all( Option :: is_some) ,
143143 "all modules must be inserted to be able to finish the registry"
144144 ) ;
145145
146- let modules = heap. allocate_slice_uninit ( self . modules . len ( ) ) ;
146+ let modules = self . heap . allocate_slice_uninit ( self . modules . len ( ) ) ;
147147 for ( dst, src) in modules. iter_mut ( ) . zip ( self . modules . iter ( ) ) {
148148 // SAFETY: We have just verified above that all modules are Some
149149 unsafe {
@@ -156,7 +156,7 @@ impl<'heap, S: Allocator> PartialModuleRegistry<'heap, S> {
156156 let modules = unsafe { modules. assume_init_ref ( ) } ;
157157
158158 ModuleRegistry {
159- heap,
159+ heap : self . heap ,
160160 modules : IdSlice :: from_raw ( modules) ,
161161 root : self . root ,
162162 }
@@ -194,7 +194,7 @@ impl<'heap> ModuleRegistry<'heap> {
194194 let mut std = StandardLibrary :: new ( env, & mut partial, scratch) ;
195195 std. register ( ) ;
196196
197- partial. finish ( env . heap )
197+ partial. finish ( )
198198 }
199199
200200 /// Looks up a root-level module by name.
@@ -322,10 +322,6 @@ impl<'heap> ModuleRegistry<'heap> {
322322 /// This method requires allocation for the traversal state:
323323 /// - A vector for the module exploration stack
324324 /// - A hash set for tracking visited modules
325- ///
326- /// # Panics
327- ///
328- /// This function will panic if the internal `RwLock` is poisoned.
329325 #[ must_use]
330326 pub fn search_by_name (
331327 & self ,
0 commit comments