@@ -149,7 +149,7 @@ unsafe fn ZDICT_count(
149149const LLIMIT : usize = 64 ;
150150const MINMATCHLENGTH : usize = 7 ;
151151unsafe fn ZDICT_analyzePos (
152- doneMarks : & mut [ u8 ] ,
152+ doneMarks : & mut [ bool ] ,
153153 suffix_slice : & [ u32 ] ,
154154 mut start : u32 ,
155155 buffer : * const core:: ffi:: c_void ,
@@ -175,7 +175,7 @@ unsafe fn ZDICT_analyzePos(
175175 let mut end = start;
176176 let mut solution = DictItem :: default ( ) ;
177177
178- doneMarks[ pos] = 1 ;
178+ doneMarks[ pos] = true ;
179179
180180 // trivial repetition cases
181181 if MEM_read16 ( b. add ( pos) as * const core:: ffi:: c_void ) as core:: ffi:: c_int
@@ -202,7 +202,7 @@ unsafe fn ZDICT_analyzePos(
202202 }
203203 u = 1 ;
204204 while u < patternEnd {
205- doneMarks[ pos. wrapping_add ( u as size_t ) ] = 1 ;
205+ doneMarks[ pos. wrapping_add ( u as size_t ) ] = true ;
206206 u = u. wrapping_add ( 1 ) ;
207207 }
208208 return solution;
@@ -241,7 +241,7 @@ unsafe fn ZDICT_analyzePos(
241241 let mut idx: u32 = 0 ;
242242 idx = start;
243243 while idx < end {
244- doneMarks[ suffix ( idx as usize ) as usize ] = 1 ;
244+ doneMarks[ suffix ( idx as usize ) as usize ] = true ;
245245 idx = idx. wrapping_add ( 1 ) ;
246246 }
247247 return solution;
@@ -431,7 +431,7 @@ unsafe fn ZDICT_analyzePos(
431431 pEnd = testedPos. wrapping_add ( length_3) ;
432432 p = testedPos;
433433 while p < pEnd {
434- doneMarks[ p as usize ] = 1 ;
434+ doneMarks[ p as usize ] = true ;
435435 p = p. wrapping_add ( 1 ) ;
436436 }
437437 id_0 = id_0. wrapping_add ( 1 ) ;
@@ -687,10 +687,10 @@ unsafe fn ZDICT_trainBuffer_legacy(
687687 eprintln ! ( "minimum ratio : {} " , minRatio) ;
688688 }
689689
690- let mut doneMarks = vec ! [ 0u8 ; bufferSize + 16 ] ;
690+ let mut doneMarks = vec ! [ false ; bufferSize + 16 ] ;
691691 let mut cursor = 0usize ;
692692 while cursor < bufferSize {
693- if doneMarks[ cursor] != 0 {
693+ if doneMarks[ cursor] {
694694 cursor += 1 ;
695695 continue ;
696696 }
0 commit comments