@@ -46,28 +46,28 @@ fn test_inner<T: BinaryHeap + Default + super::VecLike<Element = usize> + std::f
4646 let mut subject = T :: default ( ) ;
4747 let mut reference = Vec :: new ( ) ;
4848
49- log:: debug!( "max_len = {}, bytecode len = {}" , max_len , bytecode. len( ) ) ;
49+ log:: debug!( "max_len = {max_len }, bytecode len = {}" , bytecode. len( ) ) ;
5050
5151 for cmd in interpret ( & bytecode, max_len) {
52- log:: trace!( " {:?}" , cmd ) ;
52+ log:: trace!( " {cmd :?}" ) ;
5353 match cmd {
5454 Cmd :: Insert ( value) => {
5555 let i = subject. heap_push ( value, Ctx ) ;
56- log:: trace!( " β {}" , i ) ;
56+ log:: trace!( " β {i}" ) ;
5757
5858 let i = reference. binary_search ( & value) . unwrap_or_else ( |x| x) ;
5959 reference. insert ( i, value) ;
6060 }
6161 Cmd :: Remove ( i) => {
6262 let out_subject = subject. heap_remove ( i, Ctx ) . unwrap ( ) ;
63- log:: trace!( " β {}" , out_subject ) ;
63+ log:: trace!( " β {out_subject}" ) ;
6464
6565 let i_ref = reference. binary_search ( & out_subject) . unwrap ( ) ;
6666 reference. remove ( i_ref) ;
6767 }
6868 }
69- log:: trace!( "[sorted: {:?}]" , reference ) ;
70- log:: trace!( "[subject: {:?}]" , subject ) ;
69+ log:: trace!( "[sorted: {reference :?}]" ) ;
70+ log:: trace!( "[subject: {subject :?}]" ) ;
7171 if subject. len ( ) > 0 {
7272 assert_eq ! ( subject[ 0 ] , reference[ 0 ] ) ;
7373 }
@@ -120,7 +120,7 @@ impl BinaryHeapCtx<El> for TrackingCtx<'_> {
120120
121121 fn on_move ( & mut self , e : & mut El , new_index : usize ) {
122122 self . el_position [ e. id ] = Some ( new_index) ;
123- log:: trace!( " on_move{ :?}" , ( e , new_index) ) ;
123+ log:: trace!( " on_move({e :?}, { new_index})" ) ;
124124 }
125125}
126126
@@ -135,29 +135,29 @@ fn position_tracking(bytecode: Vec<u8>) {
135135 log:: debug!( "bytecode len = {}" , bytecode. len( ) ) ;
136136
137137 for cmd in interpret ( & bytecode, usize:: MAX ) {
138- log:: trace!( " {:?}" , cmd ) ;
138+ log:: trace!( " {cmd :?}" ) ;
139139 match cmd {
140140 Cmd :: Insert ( value) => {
141141 let id = el_position. len ( ) ;
142142 el_position. push ( None ) ;
143143 let i = subject. heap_push ( El { value, id } , TrackingCtx { el_position } ) ;
144- log:: trace!( " β {}" , i ) ;
144+ log:: trace!( " β {i}" ) ;
145145
146146 // `on_move` should have reported the position for the
147147 // newly-inserted element
148148 assert_eq ! ( el_position[ id] , Some ( i) ) ;
149149 }
150150 Cmd :: Remove ( i) => {
151151 let out_subject = subject. heap_remove ( i, TrackingCtx { el_position } ) . unwrap ( ) ;
152- log:: trace!( " β {:?}" , out_subject ) ;
152+ log:: trace!( " β {out_subject :?}" ) ;
153153
154154 // For a removed element, we must modify `el_position` manually
155155 el_position[ out_subject. id ] = None ;
156156 }
157157 }
158158
159- log:: trace!( "[subject: {:?}]" , subject ) ;
160- log:: trace!( "[el_position: {:?}]" , el_position ) ;
159+ log:: trace!( "[subject: {subject :?}]" ) ;
160+ log:: trace!( "[el_position: {el_position :?}]" ) ;
161161
162162 // Check if `el_position` correctly represents
163163 // the current state of `subject`
0 commit comments