diff --git a/Cargo.lock b/Cargo.lock index dcd6c16..519b3bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml index 96ba41f..0109b3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" ] } diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 97c036b..9263da7 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -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; diff --git a/src/client.rs b/src/client.rs index 2e1c955..2eb8658 100644 --- a/src/client.rs +++ b/src/client.rs @@ -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; diff --git a/src/routes.rs b/src/routes.rs index 3a6f3e1..84acff9 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -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();