move IndexResolver to real module
@@ -27,6 +27,8 @@ use self::meta_store::IndexMeta;
pub type HardStateIndexResolver = IndexResolver<HeedMetaStore, MapIndexStore>;
+pub use real::IndexResolver;
+
/// An index uid is composed of only ascii alphanumeric characters, - and _, between 1 and 400
/// bytes long
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
@@ -96,6 +98,9 @@ impl FromStr for IndexUid {
}
}
+mod real {
+ use super::*;
+
pub struct IndexResolver<U, I> {
index_uuid_store: U,
index_store: I,
@@ -227,7 +232,9 @@ where
pub async fn process_task(&self, task: &Task) -> Result<TaskResult> {
match &task.content {
- TaskContent::DocumentAddition { .. } => panic!("updates should be handled by batch"),
+ TaskContent::DocumentAddition { .. } => {
+ panic!("updates should be handled by batch")
+ }
TaskContent::DocumentDeletion {
deletion: DocumentDeletion::Ids(ids),
index_uid,
@@ -418,6 +425,7 @@ where
.ok_or(IndexResolverError::UnexistingIndex(uid))
}
}
+}
#[cfg(test)]
mod test {
