chore(all): update actix-web dependency to 4.0.0-beta.21

This commit is contained in:
Rob Ede
2022-01-21 20:44:17 +00:00
parent f9f075bca2
commit 9f5fee404b
10 changed files with 511 additions and 505 deletions

View File

@ -1,7 +1,6 @@
use std::fmt;
use actix_http::{body::Body, http::StatusCode};
use actix_web::{self as aweb, HttpResponseBuilder};
use actix_web::{self as aweb, http::StatusCode, HttpResponseBuilder};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
@ -59,7 +58,7 @@ where
}
impl aweb::error::ResponseError for ResponseError {
fn error_response(&self) -> aweb::HttpResponse<Body> {
fn error_response(&self) -> aweb::HttpResponse {
let json = serde_json::to_vec(self).unwrap();
HttpResponseBuilder::new(self.status_code())
.content_type("application/json")