This repository was archived by the owner on Sep 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
crates/wasmtime/src/runtime/component/concurrent Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 self . elems . get_mut ( k. index ( ) )
7373 }
7474
75- /// Get the element at `k` if it exists, mutable version.
76- pub fn get_mut_or_insert_with ( & mut self , k : K , f : impl FnOnce ( ) -> V ) -> & mut V {
77- if self . elems . get ( k. index ( ) ) . is_none ( ) {
78- self . elems . insert ( k. index ( ) , f ( ) ) ;
79- }
80-
81- self . elems
82- . get_mut ( k. index ( ) )
83- . expect ( "missing existing element" )
84- }
85-
8675 /// Is this map completely empty?
8776 pub fn is_empty ( & self ) -> bool {
8877 self . elems . is_empty ( )
Original file line number Diff line number Diff line change @@ -3143,9 +3143,7 @@ impl ComponentInstance {
31433143 // Here we reflect the newly created global concurrent error context state into the
31443144 // component instance's locally tracked count, along with the appropriate key into the global
31453145 // ref tracking data structures to enable later lookup
3146- let local_tbl = self
3147- . error_context_tables ( )
3148- . get_mut_or_insert_with ( ty, || StateTable :: default ( ) ) ;
3146+ let local_tbl = & mut self . error_context_tables ( ) [ ty] ;
31493147
31503148 assert ! (
31513149 !local_tbl. has_handle( table_id. rep( ) ) ,
You can’t perform that action at this time.
0 commit comments