File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ const fn gen_crc_table<const N: usize>(poly: u32) -> [[u32; 256]; N] {
32
32
table
33
33
}
34
34
35
- const CRC_TABLE : [ [ u32 ; 256 ] ; 16 ] = gen_crc_table ( 0x04c1_1db7 ) ;
35
+ // Prefer static over const to cut test times in half
36
+ // ref: https://github.com/srijs/rust-crc32fast/commit/e61ce6a39bbe9da495198a4037292ec299e8970f
37
+ static CRC_TABLE : [ [ u32 ; 256 ] ; 16 ] = gen_crc_table ( 0x04c1_1db7 ) ;
36
38
37
39
/// Calculates the crc-32 for rocket league replays. Not all CRC algorithms are the same. The crc
38
40
/// algorithm can be generated with the following parameters (pycrc):
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ fn test_replay_snapshots() {
8
8
glob ! ( "../assets/replays/good" , "*.replay" , |path| {
9
9
let data = fs:: read( path) . unwrap( ) ;
10
10
let parsed = ParserBuilder :: new( & data[ ..] )
11
- . on_error_check_crc ( ) // CRC checking in debug mode makes tests 2x slower
11
+ . always_check_crc ( )
12
12
. must_parse_network_data( )
13
13
. parse( ) ;
14
14
You can’t perform that action at this time.
0 commit comments