Return all positions that hash to the same value as `line`. Returns an empty slice if no match. Callers must verify content equality before treating a hash hit as a definite match (FNV-1a has rare collisions).
(&self, line: &[u8])
| 74 | /// equality before treating a hash hit as a definite match (FNV-1a |
| 75 | /// has rare collisions). |
| 76 | pub fn candidates(&self, line: &[u8]) -> &[usize] { |
| 77 | let h = hash_line(line); |
| 78 | self.buckets.get(&h).map(Vec::as_slice).unwrap_or(&[]) |
| 79 | } |
| 80 | |
| 81 | /// Consume one candidate position for `line` — pops the first |
| 82 | /// remaining position from the bucket. Used when matching is |