From d28451a33733655d305c17fee585c13f5e09860b Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 19 Feb 2023 23:01:32 +0000 Subject: [PATCH] bump -lab-derive version --- actix-web-lab-derive/Cargo.toml | 2 +- actix-web-lab/Cargo.toml | 6 +++--- actix-web-lab/src/acceptable.rs | 2 ++ actix-web-lab/src/guard.rs | 1 + actix-web-lab/src/redirect_to_https.rs | 3 ++- actix-web-lab/src/redirect_to_www.rs | 3 ++- actix-web-lab/src/web.rs | 3 +++ 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/actix-web-lab-derive/Cargo.toml b/actix-web-lab-derive/Cargo.toml index df3ca985..7cb42247 100644 --- a/actix-web-lab-derive/Cargo.toml +++ b/actix-web-lab-derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-web-lab-derive" -version = "0.18.0" +version = "0.19.0" description = "Experimental macros for Actix Web" authors = ["Rob Ede "] keywords = ["actix", "http", "web", "framework", "async"] diff --git a/actix-web-lab/Cargo.toml b/actix-web-lab/Cargo.toml index cc1808d5..849b647c 100644 --- a/actix-web-lab/Cargo.toml +++ b/actix-web-lab/Cargo.toml @@ -28,9 +28,9 @@ msgpack = ["rmp-serde"] spa = ["actix-files"] [dependencies] -actix-web-lab-derive = { version = "=0.18.0", optional = true } +actix-web-lab-derive = { version = "=0.19.0", optional = true } -actix-web = { version = "4.1", default-features = false } +actix-web = { version = "4.3", default-features = false } actix-http = "3" actix-service = "2" actix-router = "0.5" @@ -69,7 +69,7 @@ rmp-serde = { version = "1", optional = true } actix-files = { version = "0.6", optional = true } [dev-dependencies] -actix-web-lab-derive = "=0.18.0" +actix-web-lab-derive = "=0.19.0" actix-web = { version = "4", features = ["rustls"] } async_zip = "0.0.9" diff --git a/actix-web-lab/src/acceptable.rs b/actix-web-lab/src/acceptable.rs index 499e1b4a..86a1db2f 100644 --- a/actix-web-lab/src/acceptable.rs +++ b/actix-web-lab/src/acceptable.rs @@ -1,3 +1,5 @@ +#![allow(deprecated)] + use actix_web::{ guard::{Guard, GuardContext}, http::header::Accept, diff --git a/actix-web-lab/src/guard.rs b/actix-web-lab/src/guard.rs index 4d2d7a8f..723d3af6 100644 --- a/actix-web-lab/src/guard.rs +++ b/actix-web-lab/src/guard.rs @@ -2,4 +2,5 @@ //! //! Analogous to the `guard` module in Actix Web. +#[allow(deprecated)] pub use crate::acceptable::Acceptable; diff --git a/actix-web-lab/src/redirect_to_https.rs b/actix-web-lab/src/redirect_to_https.rs index 0c188f42..400531de 100644 --- a/actix-web-lab/src/redirect_to_https.rs +++ b/actix-web-lab/src/redirect_to_https.rs @@ -7,11 +7,12 @@ use actix_web::{ body::EitherBody, dev::{forward_ready, Service, ServiceRequest, ServiceResponse, Transform}, http::header::TryIntoHeaderPair, + web::Redirect, HttpResponse, Responder as _, }; use futures_core::future::LocalBoxFuture; -use crate::{header::StrictTransportSecurity, web::Redirect}; +use crate::header::StrictTransportSecurity; /// A middleware to redirect traffic to HTTPS if connection is insecure. /// diff --git a/actix-web-lab/src/redirect_to_www.rs b/actix-web-lab/src/redirect_to_www.rs index 9f77bd72..d49e9835 100644 --- a/actix-web-lab/src/redirect_to_www.rs +++ b/actix-web-lab/src/redirect_to_www.rs @@ -1,10 +1,11 @@ use actix_web::{ body::MessageBody, dev::{ServiceRequest, ServiceResponse}, + web::Redirect, Error, Responder, }; -use crate::{middleware_from_fn::Next, web::Redirect}; +use crate::middleware_from_fn::Next; /// A function middleware to redirect traffic to `www.` if not already there. /// diff --git a/actix-web-lab/src/web.rs b/actix-web-lab/src/web.rs index bcce7be3..f2dd8495 100644 --- a/actix-web-lab/src/web.rs +++ b/actix-web-lab/src/web.rs @@ -4,6 +4,7 @@ use std::borrow::Cow; +#[allow(deprecated)] pub use crate::redirect::Redirect; #[cfg(feature = "spa")] pub use crate::spa::Spa; @@ -24,6 +25,8 @@ pub use crate::spa::Spa; /// ``` /// /// [graduated]: https://docs.rs/actix-web/4/actix_web/web/struct.Redirect.html +#[allow(deprecated)] +#[deprecated(since = "0.19.0", note = "Type has graduated to Actix Web.")] pub fn redirect(from: impl Into>, to: impl Into>) -> Redirect { Redirect::new(from, to) }