From 4ed195426cfc2375453022e5d247207bb374df96 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 21 Nov 2024 15:00:11 +0100 Subject: [PATCH] remove unused stuff in global.rs --- crates/milli/src/fields_ids_map/global.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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> {