run rustfmt one the whole project and add it to the CI

This commit is contained in:
Tamo 2021-06-29 15:25:18 +02:00
parent de9ea94f57
commit 29bf6a8d42
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69
9 changed files with 31 additions and 19 deletions

View File

@ -65,3 +65,17 @@ jobs:
with:
command: clippy
args: --all-targets -- --deny warnings
fmt:
name: Run Rustfmt
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check

View File

@ -23,4 +23,3 @@ impl ErrorCode for AuthenticationError {
}
}
}

View File

@ -6,7 +6,7 @@ use std::sync::Arc;
use async_stream::stream;
use futures::StreamExt;
use log::{trace};
use log::trace;
use oxidized_json_checker::JsonChecker;
use tokio::fs;
use tokio::io::AsyncWriteExt;

View File

@ -1,5 +1,5 @@
use log::debug;
use actix_web::{web, HttpResponse};
use log::debug;
use serde::{Deserialize, Serialize};
use crate::error::ResponseError;

View File

@ -21,12 +21,11 @@ pub fn services(cfg: &mut web::ServiceConfig) {
.route(web::delete().to(delete_index)),
)
.service(
web::resource("/indexes/{index_uid}/updates")
.route(web::get().to(get_all_updates_status))
web::resource("/indexes/{index_uid}/updates").route(web::get().to(get_all_updates_status)),
)
.service(
web::resource("/indexes/{index_uid}/updates/{update_id}")
.route(web::get().to(get_update_status))
.route(web::get().to(get_update_status)),
);
}

View File

@ -1,7 +1,7 @@
use std::collections::{BTreeSet, HashSet};
use log::debug;
use actix_web::{web, HttpResponse};
use log::debug;
use serde::Deserialize;
use serde_json::Value;

View File

@ -1,5 +1,5 @@
use log::debug;
use actix_web::{web, HttpResponse};
use log::debug;
use crate::extractors::authentication::{policies::*, GuardedData};
use crate::index::Settings;

View File

@ -1,5 +1,5 @@
use log::debug;
use actix_web::{web, HttpResponse};
use log::debug;
use serde::Serialize;
use crate::error::ResponseError;