(data: &[u8])
| 754 | } |
| 755 | |
| 756 | fn hash_data_scalar(data: &[u8]) -> u64 { |
| 757 | let mut hash: u64 = 0; |
| 758 | for &b in data { |
| 759 | hash = hash.wrapping_add(b as u64); |
| 760 | hash = hash.wrapping_add(hash << 10); |
| 761 | hash ^= hash >> 6; |
| 762 | } |
| 763 | hash |
| 764 | } |
| 765 | |
| 766 | pub fn hash_string(key: &str, seed: u32) -> Id { |
| 767 | let mut hash: u32 = seed; |
no outgoing calls
no test coverage detected