Update to actix beta 18

master
Edward Shen 2022-01-02 12:34:00 -08:00
parent 0bf76eab6b
commit 55f6279dce
Signed by: edward
GPG Key ID: 19182661E818369F
5 changed files with 26 additions and 8 deletions

17
Cargo.lock generated
View File

@ -1,7 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "actix-codec"
version = "0.4.2"
@ -448,7 +446,9 @@ checksum = "d17bf219fcd37199b9a29e00ba65dfb8cd5b2688b7297ec14ff829c40ac50ca9"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"indexmap",
"lazy_static",
"os_str_bytes",
"strsim",
"termcolor",
@ -456,6 +456,19 @@ dependencies = [
"textwrap",
]
[[package]]
name = "clap_derive"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1b9752c030a14235a0bd5ef3ad60a1dcac8468c30921327fc8af36b20c790b9"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "combine"
version = "4.6.2"

View File

@ -21,7 +21,8 @@ codegen-units = 1
debug = 1
[dependencies]
actix-web = { version = "4.0.0-beta.8", features = [ "rustls" ] }
# Pin because we're using unstable versions
actix-web = { version = "=4.0.0-beta.18", features = [ "rustls" ] }
arc-swap = "1"
async-trait = "0.1"
base64 = "0.13"
@ -29,7 +30,7 @@ bincode = "1"
bytes = { version = "1", features = [ "serde" ] }
chacha20 = "0.7"
chrono = { version = "0.4", features = [ "serde" ] }
clap = { version = "3.0.0-beta.4", features = [ "wrap_help" ] }
clap = { version = "3", features = [ "wrap_help", "derive", "cargo" ] }
ctrlc = "3"
dotenv = "0.15"
flate2 = { version = "1", features = [ "tokio" ] }

2
src/cache/mod.rs vendored
View File

@ -5,7 +5,7 @@ use std::str::FromStr;
use std::sync::Arc;
use std::task::{Context, Poll};
use actix_web::http::HeaderValue;
use actix_web::http::header::HeaderValue;
use async_trait::async_trait;
use bytes::Bytes;
use chacha20::Key;

View File

@ -3,7 +3,7 @@ use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::time::Duration;
use actix_web::http::{HeaderMap, HeaderName, HeaderValue};
use actix_web::http::header::{HeaderMap, HeaderName, HeaderValue};
use actix_web::web::Data;
use bytes::Bytes;
use once_cell::sync::Lazy;

View File

@ -1,9 +1,9 @@
use std::hint::unreachable_unchecked;
use std::sync::atomic::Ordering;
use actix_web::body::BoxBody;
use actix_web::error::ErrorNotFound;
use actix_web::http::header::{CONTENT_LENGTH, CONTENT_TYPE, LAST_MODIFIED};
use actix_web::http::HeaderValue;
use actix_web::http::header::{CONTENT_LENGTH, CONTENT_TYPE, LAST_MODIFIED, HeaderValue};
use actix_web::web::Path;
use actix_web::HttpResponseBuilder;
use actix_web::{get, web::Data, HttpRequest, HttpResponse, Responder};
@ -34,6 +34,8 @@ pub enum ServerResponse {
}
impl Responder for ServerResponse {
type Body = BoxBody;
#[inline]
fn respond_to(self, req: &HttpRequest) -> HttpResponse {
match self {
@ -151,6 +153,8 @@ pub enum TokenValidationError {
}
impl Responder for TokenValidationError {
type Body = BoxBody;
#[inline]
fn respond_to(self, _: &HttpRequest) -> HttpResponse {
let mut resp = HttpResponse::Forbidden().finish();