@@ -127,20 +127,23 @@ impl ByteRepr for MinHeap {
127127pub fn AllocMinHeap_1 ( capacity : i32 ) -> Option < Value < MinHeap > > {
128128 let capacity: Value < i32 > = Rc :: new ( RefCell :: new ( capacity) ) ;
129129 let minHeap: Value < Option < Value < MinHeap > > > =
130- Rc :: new ( RefCell :: new ( Some ( Rc :: new ( RefCell :: new ( MinHeap {
131- size : Rc :: new ( RefCell :: new ( 0 ) ) ,
132- capacity : Rc :: new ( RefCell :: new ( ( * capacity. borrow ( ) ) ) ) ,
133- arr : Rc :: new ( RefCell :: new ( Some ( Rc :: new ( RefCell :: new (
134- ( 0 ..( ( * capacity. borrow ( ) ) as usize ) )
135- . map ( |_| <Ptr < MinHeapNode > >:: default ( ) )
136- . collect :: < Box < [ _ ] > > ( ) ,
137- ) ) ) ) ) ,
138- next : Rc :: new ( RefCell :: new ( 0 ) ) ,
139- alloc : Rc :: new ( RefCell :: new ( Some ( Rc :: new ( RefCell :: new (
140- ( 0 ..10000_usize )
141- . map ( |_| <MinHeapNode >:: default ( ) )
142- . collect :: < Box < [ _ ] > > ( ) ,
143- ) ) ) ) ) ,
130+ Rc :: new ( RefCell :: new ( Some ( Rc :: new ( RefCell :: new ( {
131+ let __tmp_0: Value < MinHeap > = Rc :: new ( RefCell :: new ( MinHeap {
132+ size : Rc :: new ( RefCell :: new ( 0 ) ) ,
133+ capacity : Rc :: new ( RefCell :: new ( ( * capacity. borrow ( ) ) ) ) ,
134+ arr : Rc :: new ( RefCell :: new ( Some ( Rc :: new ( RefCell :: new (
135+ ( 0 ..( ( * capacity. borrow ( ) ) as usize ) )
136+ . map ( |_| <Ptr < MinHeapNode > >:: default ( ) )
137+ . collect :: < Box < [ _ ] > > ( ) ,
138+ ) ) ) ) ) ,
139+ next : Rc :: new ( RefCell :: new ( 0 ) ) ,
140+ alloc : Rc :: new ( RefCell :: new ( Some ( Rc :: new ( RefCell :: new (
141+ ( 0 ..10000_usize )
142+ . map ( |_| <MinHeapNode >:: default ( ) )
143+ . collect :: < Box < [ _ ] > > ( ) ,
144+ ) ) ) ) ) ,
145+ } ) ) ;
146+ MinHeap :: move_from ( { __tmp_0. as_pointer ( ) } )
144147 } ) ) ) ) ) ;
145148 return ( * minHeap. borrow_mut ( ) ) . take ( ) ;
146149}
0 commit comments