diff --git a/meilidb-data/src/database/index/common_index.rs b/meilidb-data/src/database/index/common_index.rs index d102bb3bb..04fe39bd3 100644 --- a/meilidb-data/src/database/index/common_index.rs +++ b/meilidb-data/src/database/index/common_index.rs @@ -1,3 +1,4 @@ +use std::ops::Deref; use serde::de::DeserializeOwned; use serde::Serialize; use super::Error; @@ -6,6 +7,14 @@ use std::marker::PhantomData; #[derive(Clone)] pub struct CommonIndex(pub crate::CfTree); +impl Deref for CommonIndex { + type Target = crate::CfTree; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + impl CommonIndex { pub fn get(&self, key: K) -> Result, Error> where T: DeserializeOwned,