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

@ -33,16 +33,16 @@ guard_content_type!(guard_json, "application/json");
*/
fn guard_json(head: &actix_web::dev::RequestHead) -> bool {
if let Some(content_type) = head.headers.get("Content-Type") {
content_type
.to_str()
.map(|v| v.contains("application/json"))
.unwrap_or(false)
} else {
// if no content-type is specified we still accept the data as json!
true
}
}
if let Some(content_type) = head.headers.get("Content-Type") {
content_type
.to_str()
.map(|v| v.contains("application/json"))
.unwrap_or(false)
} else {
// if no content-type is specified we still accept the data as json!
true
}
}
#[derive(Deserialize)]
struct DocumentParam {