File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -225,14 +225,10 @@ fn fallbackSort(
225225 let mut ftab: [ i32 ; 257 ] = [ 0 ; 257 ] ;
226226 let mut ftabCopy: [ i32 ; 256 ] = [ 0 ; 256 ] ;
227227 let mut H : i32 ;
228- let mut i: i32 ;
229- let mut j: i32 ;
230228 let mut k: i32 ;
231229 let mut l: i32 ;
232- let mut r: i32 ;
233230 let mut cc: i32 ;
234231 let mut cc1: i32 ;
235- let mut nNotDone: i32 ;
236232
237233 /*--
238234 Initial 1-char radix sort to generate
@@ -287,21 +283,20 @@ fn fallbackSort(
287283 if verb >= 4 {
288284 debug_log ! ( " depth {:>6} has " , H ) ;
289285 }
290- j = 0 ;
291- i = 0 ;
292- while i < nblock {
286+ let mut j = 0 ;
287+ for ( i, x) in fmap[ ..nblock as usize ] . iter ( ) . enumerate ( ) {
293288 if ISSET_BH ! ( i) {
294289 j = i;
295290 }
296- k = fmap [ i as usize ] . wrapping_sub ( H as c_uint ) as i32 ;
291+ k = x . wrapping_sub ( H as c_uint ) as i32 ;
297292 if k < 0 {
298293 k += nblock;
299294 }
300295 arr2. eclass ( ) [ k as usize ] = j as u32 ;
301- i += 1 ;
302296 }
303- nNotDone = 0 ;
304- r = -1 ;
297+
298+ let mut nNotDone = 0 ;
299+ let mut r = -1 ;
305300 loop {
306301 /*-- find the next non-singleton bucket --*/
307302 k = r + 1 ;
You can’t perform that action at this time.
0 commit comments