@@ -211,7 +211,7 @@ pub fn StoreLookaheadThenStore<T: AnyHasher>(hasher: &mut T, size: usize, dict:
211
211
pub trait BasicHashComputer {
212
212
fn HashBytes ( & self , data : & [ u8 ] ) -> u32 ;
213
213
fn BUCKET_BITS ( & self ) -> i32 ;
214
- fn USE_DICTIONARY ( & self ) -> i32 ;
214
+ fn use_dictionary ( & self ) -> bool ;
215
215
fn BUCKET_SWEEP ( & self ) -> i32 ;
216
216
}
217
217
pub struct BasicHasher < Buckets : SliceWrapperMut < u32 > + SliceWrapper < u32 > + BasicHashComputer > {
@@ -435,7 +435,7 @@ impl<T: SliceWrapperMut<u32> + SliceWrapper<u32> + BasicHashComputer> AnyHasher
435
435
}
436
436
}
437
437
}
438
- if dictionary. is_some ( ) && self . buckets_ . USE_DICTIONARY ( ) != 0 && !is_match_found {
438
+ if dictionary. is_some ( ) && self . buckets_ . use_dictionary ( ) && !is_match_found {
439
439
is_match_found = SearchInStaticDictionary (
440
440
dictionary. unwrap ( ) ,
441
441
dictionary_hash,
@@ -466,8 +466,8 @@ impl<AllocU32: alloc::Allocator<u32>> BasicHashComputer for H2Sub<AllocU32> {
466
466
fn BUCKET_SWEEP ( & self ) -> i32 {
467
467
1
468
468
}
469
- fn USE_DICTIONARY ( & self ) -> i32 {
470
- 1
469
+ fn use_dictionary ( & self ) -> bool {
470
+ true
471
471
}
472
472
}
473
473
impl < AllocU32 : alloc:: Allocator < u32 > > SliceWrapperMut < u32 > for H2Sub < AllocU32 > {
@@ -500,8 +500,8 @@ impl<AllocU32: alloc::Allocator<u32>> BasicHashComputer for H3Sub<AllocU32> {
500
500
fn BUCKET_SWEEP ( & self ) -> i32 {
501
501
2
502
502
}
503
- fn USE_DICTIONARY ( & self ) -> i32 {
504
- 0
503
+ fn use_dictionary ( & self ) -> bool {
504
+ false
505
505
}
506
506
fn HashBytes ( & self , data : & [ u8 ] ) -> u32 {
507
507
let h: u64 =
@@ -519,8 +519,8 @@ impl<AllocU32: alloc::Allocator<u32>> BasicHashComputer for H4Sub<AllocU32> {
519
519
fn BUCKET_SWEEP ( & self ) -> i32 {
520
520
4
521
521
}
522
- fn USE_DICTIONARY ( & self ) -> i32 {
523
- 1
522
+ fn use_dictionary ( & self ) -> bool {
523
+ true
524
524
}
525
525
fn HashBytes ( & self , data : & [ u8 ] ) -> u32 {
526
526
let h: u64 =
@@ -548,8 +548,8 @@ impl<AllocU32: alloc::Allocator<u32>> BasicHashComputer for H54Sub<AllocU32> {
548
548
fn BUCKET_SWEEP ( & self ) -> i32 {
549
549
4
550
550
}
551
- fn USE_DICTIONARY ( & self ) -> i32 {
552
- 0
551
+ fn use_dictionary ( & self ) -> bool {
552
+ false
553
553
}
554
554
fn HashBytes ( & self , data : & [ u8 ] ) -> u32 {
555
555
let h: u64 =
0 commit comments