@@ -623,15 +623,15 @@ unsafe extern "C" fn HUF_decompress4X1_usingDTable_internal_fast_c_loop(
623623 let mut ip = args. ip ;
624624 let mut op = args. op ;
625625
626- assert ! ( cfg!( target_endian = "little" ) ) ;
627- assert ! ( cfg!( target_pointer_width = "64" ) ) ;
626+ debug_assert ! ( cfg!( target_endian = "little" ) ) ;
627+ debug_assert ! ( cfg!( target_pointer_width = "64" ) ) ;
628628
629629 ' out: loop {
630630 /* Assert loop preconditions */
631631 if cfg ! ( debug_assertions) {
632632 for stream in 0 ..4 {
633- assert ! ( op[ stream] <= ( if stream == 3 { oend } else { op[ stream + 1 ] } ) ) ;
634- assert ! ( ip[ stream] >= ilowest) ;
633+ debug_assert ! ( op[ stream] <= ( if stream == 3 { oend } else { op[ stream + 1 ] } ) ) ;
634+ debug_assert ! ( ip[ stream] >= ilowest) ;
635635 }
636636 }
637637
@@ -664,7 +664,7 @@ unsafe extern "C" fn HUF_decompress4X1_usingDTable_internal_fast_c_loop(
664664
665665 if cfg ! ( debug_assertions) {
666666 for stream in 1 ..4 {
667- assert ! ( ip[ stream] >= ip[ stream - 1 ] ) ;
667+ debug_assert ! ( ip[ stream] >= ip[ stream - 1 ] ) ;
668668 }
669669 }
670670
@@ -734,19 +734,19 @@ unsafe fn HUF_decompress4X1_usingDTable_internal_fast(
734734 Err ( e) => return e. to_error_code ( ) ,
735735 } ;
736736
737- assert ! ( args. ip[ 0 ] >= args. ilowest) ;
737+ debug_assert ! ( args. ip[ 0 ] >= args. ilowest) ;
738738 loopFn ( & mut args) ;
739739
740740 // Our loop guarantees that ip[] >= ilowest and that we haven't overwritten any op[].
741741 let istart = src. as_ptr ( ) ;
742- assert ! ( args. ip[ 0 ] >= istart) ;
743- assert ! ( args. ip[ 1 ] >= istart) ;
744- assert ! ( args. ip[ 2 ] >= istart) ;
745- assert ! ( args. ip[ 3 ] >= istart) ;
746- assert ! ( args. op[ 3 ] <= oend) ;
742+ debug_assert ! ( args. ip[ 0 ] >= istart) ;
743+ debug_assert ! ( args. ip[ 1 ] >= istart) ;
744+ debug_assert ! ( args. ip[ 2 ] >= istart) ;
745+ debug_assert ! ( args. ip[ 3 ] >= istart) ;
746+ debug_assert ! ( args. op[ 3 ] <= oend) ;
747747
748- assert_eq ! ( istart, args. ilowest) ;
749- assert_eq ! ( istart. wrapping_add( 6 ) , args. iend[ 0 ] ) ;
748+ debug_assert_eq ! ( istart, args. ilowest) ;
749+ debug_assert_eq ! ( istart. wrapping_add( 6 ) , args. iend[ 0 ] ) ;
750750
751751 let segmentSize = dst. capacity ( ) . div_ceil ( 4 ) ;
752752 let mut segmentEnd = dst. as_mut_ptr_range ( ) . start ;
@@ -1439,8 +1439,8 @@ unsafe extern "C" fn HUF_decompress4X2_usingDTable_internal_fast_c_loop(
14391439 /* Assert loop preconditions */
14401440 if cfg ! ( debug_assertions) {
14411441 for stream in 0 ..4 {
1442- assert ! ( op[ stream] <= oend[ stream] ) ;
1443- assert ! ( ip[ stream] >= ilowest) ;
1442+ debug_assert ! ( op[ stream] <= oend[ stream] ) ;
1443+ debug_assert ! ( ip[ stream] >= ilowest) ;
14441444 }
14451445 }
14461446
@@ -1489,7 +1489,7 @@ unsafe extern "C" fn HUF_decompress4X2_usingDTable_internal_fast_c_loop(
14891489 }
14901490
14911491 for stream in 1 ..4 {
1492- assert ! ( ip[ stream] >= ip[ stream - 1 ] ) ;
1492+ debug_assert ! ( ip[ stream] >= ip[ stream - 1 ] ) ;
14931493 }
14941494
14951495 macro_rules! HUF_4X2_DECODE_SYMBOL {
@@ -1568,19 +1568,19 @@ unsafe fn HUF_decompress4X2_usingDTable_internal_fast(
15681568 Err ( e) => return e. to_error_code ( ) ,
15691569 } ;
15701570
1571- assert ! ( args. ip[ 0 ] >= args. ilowest) ;
1571+ debug_assert ! ( args. ip[ 0 ] >= args. ilowest) ;
15721572 loopFn ( & mut args) ;
15731573
15741574 // note : op4 already verified within main loop.
15751575 let ilowest = src. as_ptr ( ) ;
1576- assert ! ( args. ip[ 0 ] >= ilowest) ;
1577- assert ! ( args. ip[ 1 ] >= ilowest) ;
1578- assert ! ( args. ip[ 2 ] >= ilowest) ;
1579- assert ! ( args. ip[ 3 ] >= ilowest) ;
1580- assert ! ( args. op[ 3 ] <= oend) ;
1576+ debug_assert ! ( args. ip[ 0 ] >= ilowest) ;
1577+ debug_assert ! ( args. ip[ 1 ] >= ilowest) ;
1578+ debug_assert ! ( args. ip[ 2 ] >= ilowest) ;
1579+ debug_assert ! ( args. ip[ 3 ] >= ilowest) ;
1580+ debug_assert ! ( args. op[ 3 ] <= oend) ;
15811581
1582- assert_eq ! ( ilowest, args. ilowest) ;
1583- assert_eq ! ( ilowest. add( 6 ) , args. iend[ 0 ] ) ;
1582+ debug_assert_eq ! ( ilowest, args. ilowest) ;
1583+ debug_assert_eq ! ( ilowest. add( 6 ) , args. iend[ 0 ] ) ;
15841584
15851585 let segmentSize = dst. capacity ( ) . div_ceil ( 4 ) as isize ;
15861586 let mut segmentEnd = dst. as_mut_ptr ( ) ;
@@ -2177,10 +2177,10 @@ impl<'a> Writer<'a> {
21772177 return None ;
21782178 }
21792179
2180- assert ! ( w1. end <= range. end) ;
2181- assert ! ( w2. end <= range. end) ;
2182- assert ! ( w3. end <= range. end) ;
2183- assert ! ( w4. end <= range. end) ;
2180+ debug_assert ! ( w1. end <= range. end) ;
2181+ debug_assert ! ( w2. end <= range. end) ;
2182+ debug_assert ! ( w3. end <= range. end) ;
2183+ debug_assert ! ( w4. end <= range. end) ;
21842184
21852185 Some ( ( w1, w2, w3, w4) )
21862186 }
0 commit comments