mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
fix clippy part1
This commit is contained in:
parent
2ba5e3b519
commit
8ec3681cf8
6 changed files with 16 additions and 16 deletions
|
@ -40,20 +40,20 @@ pub async fn swap_indexes(
|
|||
return Err(MeilisearchHttpError::SwapIndexPayloadWrongLength(indexes).into());
|
||||
}
|
||||
};
|
||||
if !search_rules.is_index_authorized(&lhs) {
|
||||
if !search_rules.is_index_authorized(lhs) {
|
||||
unauthorized_indexes.insert(lhs.clone());
|
||||
}
|
||||
if !search_rules.is_index_authorized(&rhs) {
|
||||
if !search_rules.is_index_authorized(rhs) {
|
||||
unauthorized_indexes.insert(rhs.clone());
|
||||
}
|
||||
match index_scheduler.index(&lhs) {
|
||||
match index_scheduler.index(lhs) {
|
||||
Ok(_) => (),
|
||||
Err(index_scheduler::Error::IndexNotFound(_)) => {
|
||||
unknown_indexes.insert(lhs.clone());
|
||||
}
|
||||
Err(e) => return Err(e.into()),
|
||||
}
|
||||
match index_scheduler.index(&rhs) {
|
||||
match index_scheduler.index(rhs) {
|
||||
Ok(_) => (),
|
||||
Err(index_scheduler::Error::IndexNotFound(_)) => {
|
||||
unknown_indexes.insert(rhs.clone());
|
||||
|
|
|
@ -32,7 +32,7 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
|
|||
.service(web::resource("/{task_id}").route(web::get().to(SeqHandler(get_task))));
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct TaskView {
|
||||
pub uid: TaskId,
|
||||
|
@ -78,7 +78,7 @@ impl TaskView {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, PartialEq, Clone, Serialize)]
|
||||
#[derive(Default, Debug, PartialEq, Eq, Clone, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct DetailsView {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue