type setting struct

This commit is contained in:
Marin Postma
2021-05-10 17:30:09 +02:00
parent 998d5ead34
commit 706643dfed
11 changed files with 47 additions and 29 deletions

View File

@ -3,7 +3,7 @@ use std::sync::Arc;
use sha2::Digest;
use crate::index::Settings;
use crate::index::{Checked, Settings};
use crate::index_controller::{IndexController, IndexStats, Stats};
use crate::index_controller::{IndexMetadata, IndexSettings};
use crate::option::Opt;
@ -74,7 +74,7 @@ impl Data {
Ok(Data { inner })
}
pub async fn settings(&self, uid: String) -> anyhow::Result<Settings> {
pub async fn settings(&self, uid: String) -> anyhow::Result<Settings<Checked>> {
self.index_controller.settings(uid).await
}

View File

@ -2,7 +2,7 @@ use actix_web::web::Payload;
use milli::update::{IndexDocumentsMethod, UpdateFormat};
use super::Data;
use crate::index::Settings;
use crate::index::{Checked, Settings};
use crate::index_controller::{IndexMetadata, IndexSettings, UpdateStatus};
impl Data {
@ -24,7 +24,7 @@ impl Data {
pub async fn update_settings(
&self,
index: String,
settings: Settings,
settings: Settings<Checked>,
create: bool,
) -> anyhow::Result<UpdateStatus> {
let update = self