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
No known key found for this signature in database
GPG key ID: 97C636207D3EF933
10 changed files with 511 additions and 505 deletions

View file

@ -5,8 +5,7 @@ authors = ["marin <postma.marin@protonmail.com>"]
edition = "2021"
[dependencies]
actix-http = "=3.0.0-beta.10"
actix-web = "4.0.0-beta.9"
actix-web = { version = "4.0.0-beta.21", default-features = false }
proptest = { version = "1.0.0", optional = true }
proptest-derive = { version = "0.3.0", optional = true }
serde = { version = "1.0.130", features = ["derive"] }

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")