clippy + fmt

This commit is contained in:
Quentin de Quelen 2020-04-10 19:05:05 +02:00 committed by qdequele
parent 22fbff98d4
commit 6a1f73a304
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
17 changed files with 633 additions and 339 deletions

View file

@ -1,7 +1,7 @@
use actix_web::{get, HttpResponse};
use serde::{Serialize, Deserialize};
use log::error;
use meilisearch_core::ProcessedUpdateResult;
use serde::{Deserialize, Serialize};
use crate::Data;
@ -10,14 +10,14 @@ pub mod health;
pub mod index;
pub mod key;
pub mod search;
pub mod stats;
pub mod setting;
pub mod stats;
pub mod stop_words;
pub mod synonym;
#[derive(Default, Deserialize)]
pub struct IndexParam {
index_uid: String
index_uid: String,
}
#[derive(Default, Serialize)]
@ -28,9 +28,7 @@ pub struct IndexUpdateResponse {
impl IndexUpdateResponse {
pub fn with_id(update_id: u64) -> Self {
Self {
update_id,
}
Self { update_id }
}
}
@ -48,7 +46,6 @@ pub async fn load_css() -> HttpResponse {
.body(include_str!("../../public/bulma.min.css").to_string())
}
pub fn index_update_callback(index_uid: &str, data: &Data, status: ProcessedUpdateResult) {
if status.error.is_some() {
return;
@ -82,7 +79,6 @@ pub fn index_update_callback(index_uid: &str, data: &Data, status: ProcessedUpda
}
}
// pub fn load_routes(app: &mut tide::Server<Data>) {
// app.at("/").get(|_| async {
// tide::Response::new(200)