//! The previous MPHF generation (`ptr_hash` 1.x), kept only to read the //! `mphf.bin` files of indexes built before the migration. use std::path::Path; use anyhow::{Result, anyhow}; use cacheline_ef_old::{CachelineEf, CachelineEfVec}; use epserde_old::prelude::*; use ptr_hash_old::{PtrHash, bucket_fn::CubicEps, hash::Xx64}; /// Exactly the type `obikindex` used before the migration. pub type OldMphf = PtrHash>, Xx64, Vec>; pub fn load(path: &Path) -> Result { OldMphf::load_full(path) .map_err(|e| anyhow!("{}: not a ptr_hash 1.x MPHF (already converted?): {e}", path.display())) }