Extract PrimaryKey logic to a type

This commit is contained in:
Louis Dureuil 2023-11-09 14:19:16 +01:00
parent 523519fdbf
commit db2fb86b8b
No known key found for this signature in database
3 changed files with 184 additions and 0 deletions

View file

@ -81,6 +81,12 @@ impl Default for FieldsIdsMap {
}
}
impl crate::documents::FieldDistribution for FieldsIdsMap {
fn id(&self, name: &str) -> Option<FieldId> {
self.id(name)
}
}
#[cfg(test)]
mod tests {
use super::*;