Compute FNV-1a hash the same way the module does (duplicated in test for constructing colliding sidecar entries without exposing the private fn).
(s: &str)
| 536 | /// Compute FNV-1a hash the same way the module does (duplicated in test for |
| 537 | /// constructing colliding sidecar entries without exposing the private fn). |
| 538 | fn test_fnv1a(s: &str) -> u64 { |
| 539 | let mut hash: u64 = 0xcbf29ce484222325; |
| 540 | for &b in s.as_bytes() { |
| 541 | hash ^= b as u64; |
| 542 | hash = hash.wrapping_mul(0x100000001b3); |
| 543 | } |
| 544 | hash |
| 545 | } |
| 546 | |
| 547 | /// Inject two sidecar entries with the same hash but different field names, |
| 548 | /// then verify that lookup correctly returns the right value for each field |
no test coverage detected