@@ -398,21 +398,17 @@ unsafe fn ZDICT_analyzePos(
398398}
399399
400400unsafe fn isIncluded (
401- in_0 : * const core:: ffi:: c_void ,
402- container : * const core:: ffi:: c_void ,
401+ ip : * const core:: ffi:: c_char ,
402+ into : * const core:: ffi:: c_char ,
403403 length : size_t ,
404- ) -> core:: ffi:: c_int {
405- let ip = in_0 as * const core:: ffi:: c_char ;
406- let into = container as * const core:: ffi:: c_char ;
407- let mut u: size_t = 0 ;
408- u = 0 ;
409- while u < length {
410- if * ip. add ( u) as core:: ffi:: c_int != * into. add ( u) as core:: ffi:: c_int {
411- break ;
404+ ) -> bool {
405+ for u in 0 ..length {
406+ if * ip. add ( u) != * into. add ( u) {
407+ return false ;
412408 }
413- u = u. wrapping_add ( 1 ) ;
414409 }
415- ( u == length) as core:: ffi:: c_int
410+
411+ true
416412}
417413
418414unsafe fn ZDICT_tryMerge (
@@ -485,11 +481,10 @@ unsafe fn ZDICT_tryMerge(
485481 buf. offset ( ( * table. offset ( u as isize ) ) . pos as isize ) as * const core:: ffi:: c_void
486482 ) == MEM_read64 ( buf. offset ( elt. pos as isize ) . add ( 1 ) as * const core:: ffi:: c_void )
487483 && isIncluded (
488- buf. offset ( ( * table. offset ( u as isize ) ) . pos as isize )
489- as * const core:: ffi:: c_void ,
490- buf. offset ( elt. pos as isize ) . add ( 1 ) as * const core:: ffi:: c_void ,
484+ buf. offset ( ( * table. offset ( u as isize ) ) . pos as isize ) ,
485+ buf. offset ( elt. pos as isize ) . add ( 1 ) ,
491486 ( * table. offset ( u as isize ) ) . length as size_t ,
492- ) != 0
487+ )
493488 {
494489 let addedLength_1 = Ord :: max (
495490 ( elt. length ) . wrapping_sub ( ( * table. offset ( u as isize ) ) . length ) ,
0 commit comments