diff --git a/meilidb-data/src/database/documents_addition.rs b/meilidb-data/src/database/documents_addition.rs index b22c06da6..a65334eb2 100644 --- a/meilidb-data/src/database/documents_addition.rs +++ b/meilidb-data/src/database/documents_addition.rs @@ -20,7 +20,7 @@ pub struct DocumentsAddition<'a> { } impl<'a> DocumentsAddition<'a> { - pub(crate) fn new(inner: &'a Index, ranked_map: RankedMap) -> DocumentsAddition<'a> { + pub fn new(inner: &'a Index, ranked_map: RankedMap) -> DocumentsAddition<'a> { DocumentsAddition { inner, document_ids: HashSet::new(), diff --git a/meilidb-data/src/database/documents_deletion.rs b/meilidb-data/src/database/documents_deletion.rs index 5729e3461..775b8d7f6 100644 --- a/meilidb-data/src/database/documents_deletion.rs +++ b/meilidb-data/src/database/documents_deletion.rs @@ -13,7 +13,7 @@ pub struct DocumentsDeletion<'a> { } impl<'a> DocumentsDeletion<'a> { - pub(crate) fn new(inner: &'a Index) -> DocumentsDeletion { + pub fn new(inner: &'a Index) -> DocumentsDeletion { DocumentsDeletion { inner, documents: Vec::new() } } diff --git a/meilidb-data/src/database/documents_index.rs b/meilidb-data/src/database/documents_index.rs index 36866a638..5fd276bb3 100644 --- a/meilidb-data/src/database/documents_index.rs +++ b/meilidb-data/src/database/documents_index.rs @@ -8,7 +8,7 @@ use crate::document_attr_key::DocumentAttrKey; use crate::schema::SchemaAttr; #[derive(Clone)] -pub struct DocumentsIndex(pub(crate) Arc); +pub struct DocumentsIndex(pub Arc); impl DocumentsIndex { pub fn document_field(&self, id: DocumentId, attr: SchemaAttr) -> sled::Result> { diff --git a/meilidb-data/src/database/index.rs b/meilidb-data/src/database/index.rs index d4ed26636..c534cd33d 100644 --- a/meilidb-data/src/database/index.rs +++ b/meilidb-data/src/database/index.rs @@ -15,7 +15,7 @@ use crate::serde::Deserializer; use super::{Error, RawIndex, DocumentsAddition, DocumentsDeletion}; #[derive(Clone)] -pub struct Index(pub(crate) ArcSwap); +pub struct Index(pub ArcSwap); pub struct InnerIndex { pub words: fst::Set, @@ -25,7 +25,7 @@ pub struct InnerIndex { } impl Index { - pub(crate) fn from_raw(raw: RawIndex) -> Result { + pub fn from_raw(raw: RawIndex) -> Result { let words = match raw.main.words_set()? { Some(words) => words, None => fst::Set::default(), diff --git a/meilidb-data/src/database/main_index.rs b/meilidb-data/src/database/main_index.rs index f8d389774..b1d8edc81 100644 --- a/meilidb-data/src/database/main_index.rs +++ b/meilidb-data/src/database/main_index.rs @@ -6,7 +6,7 @@ use crate::schema::Schema; use super::Error; #[derive(Clone)] -pub struct MainIndex(pub(crate) Arc); +pub struct MainIndex(pub Arc); impl MainIndex { pub fn schema(&self) -> Result, Error> { diff --git a/meilidb-data/src/database/words_index.rs b/meilidb-data/src/database/words_index.rs index 398e73900..3b2598186 100644 --- a/meilidb-data/src/database/words_index.rs +++ b/meilidb-data/src/database/words_index.rs @@ -5,7 +5,7 @@ use sdset::{Set, SetBuf}; use zerocopy::{LayoutVerified, AsBytes}; #[derive(Clone)] -pub struct WordsIndex(pub(crate) Arc); +pub struct WordsIndex(pub Arc); impl WordsIndex { pub fn doc_indexes(&self, word: &[u8]) -> sled::Result>> { diff --git a/meilidb-data/src/schema.rs b/meilidb-data/src/schema.rs index cc39cf0e8..bd1c853dc 100644 --- a/meilidb-data/src/schema.rs +++ b/meilidb-data/src/schema.rs @@ -134,12 +134,12 @@ impl Schema { Ok(()) } - pub(crate) fn read_from_bin(reader: R) -> bincode::Result { + pub fn read_from_bin(reader: R) -> bincode::Result { let builder: SchemaBuilder = bincode::deserialize_from(reader)?; Ok(builder.build()) } - pub(crate) fn write_to_bin(&self, writer: W) -> bincode::Result<()> { + pub fn write_to_bin(&self, writer: W) -> bincode::Result<()> { let identifier = self.inner.identifier.clone(); let attributes = self.attributes_ordered(); let builder = SchemaBuilder { identifier, attributes };