(id: &str)
| 8 | use crate::helpers::*; |
| 9 | |
| 10 | fn surrogate_for(id: &str) -> nodedb_types::Surrogate { |
| 11 | let mut h: u32 = 2_166_136_261; |
| 12 | for &b in id.as_bytes() { |
| 13 | h ^= b as u32; |
| 14 | h = h.wrapping_mul(16_777_619); |
| 15 | } |
| 16 | nodedb_types::Surrogate::new(h.max(1)) |
| 17 | } |
| 18 | |
| 19 | fn insert_product( |
| 20 | core: &mut nodedb::data::executor::core_loop::CoreLoop, |
no test coverage detected