diff --git a/crates/milli/src/fields_ids_map/global.rs b/crates/milli/src/fields_ids_map/global.rs index 32aefbfdf..2ffc45eb7 100644 --- a/crates/milli/src/fields_ids_map/global.rs +++ b/crates/milli/src/fields_ids_map/global.rs @@ -3,7 +3,6 @@ use std::sync::RwLock; use super::metadata::{FieldIdMapWithMetadata, Metadata}; use super::MutFieldIdMapper; -use crate::documents::FieldIdMapper; use crate::FieldId; /// A fields ids map that can be globally updated to add fields @@ -14,22 +13,12 @@ pub struct GlobalFieldsIdsMap<'indexing> { } #[derive(Debug, Clone)] -pub struct LocalFieldsIdsMap { +struct LocalFieldsIdsMap { names_ids: BTreeMap, ids_names: BTreeMap, metadata: BTreeMap, } -impl FieldIdMapper for LocalFieldsIdsMap { - fn id(&self, name: &str) -> Option { - self.id(name) - } - - fn name(&self, id: FieldId) -> Option<&str> { - self.name(id) - } -} - impl LocalFieldsIdsMap { fn new(global: &RwLock) -> Self { let global = global.read().unwrap(); @@ -116,10 +105,6 @@ impl<'indexing> GlobalFieldsIdsMap<'indexing> { self.local.name(id) } - - pub fn local_map(&self) -> &LocalFieldsIdsMap { - &self.local - } } impl<'indexing> MutFieldIdMapper for GlobalFieldsIdsMap<'indexing> {