Skip to content

Commit

Permalink
update actix-web dependencies to v4 beta.10 (#203)
Browse files Browse the repository at this point in the history
Co-authored-by: Rob Ede <robjtede@icloud.com>
  • Loading branch information
wdv4758h and robjtede committed Oct 21, 2021
1 parent 627fe96 commit 545873b
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 32 deletions.
2 changes: 2 additions & 0 deletions actix-cors/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

## Unreleased - 2021-xx-xx
* Make `Cors` middleware generic over body type [#195]
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
* Minimum supported Rust version (MSRV) is now 1.52.

[#195]: https://github.com/actix/actix-extras/pull/195
[#203]: https://github.com/actix/actix-extras/pull/203


## 0.6.0-beta.2 - 2021-06-27
Expand Down
2 changes: 1 addition & 1 deletion actix-cors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name = "actix_cors"
path = "src/lib.rs"

[dependencies]
actix-web = { version = "4.0.0-beta.8", default-features = false }
actix-web = { version = "4.0.0-beta.10", default-features = false }
actix-service = "2.0.0"

derive_more = "0.99.5"
Expand Down
3 changes: 3 additions & 0 deletions actix-identity/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changes

## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
* Minimum supported Rust version (MSRV) is now 1.52.

[#203]: https://github.com/actix/actix-extras/pull/203


## 0.4.0-beta.2 - 2020-06-27
* No notable changes.
Expand Down
4 changes: 2 additions & 2 deletions actix-identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ path = "src/lib.rs"

[dependencies]
actix-service = "2.0.0"
actix-web = { version = "4.0.0-beta.8", default-features = false, features = ["cookies", "secure-cookies"] }
actix-web = { version = "4.0.0-beta.10", default-features = false, features = ["cookies", "secure-cookies"] }
futures-util = { version = "0.3.7", default-features = false }
serde = "1.0"
serde_json = "1.0"
time = "0.2.23"

[dev-dependencies]
actix-http = "3.0.0-beta.8"
actix-http = "3.0.0-beta.11"
actix-rt = "2"
1 change: 0 additions & 1 deletion actix-identity/src/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ impl Identity {
/// }
/// ```
impl FromRequest for Identity {
type Config = ();
type Error = Error;
type Future = Ready<Result<Identity, Error>>;

Expand Down
4 changes: 3 additions & 1 deletion actix-protobuf/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changes

## Unreleased - 2020-xx-xx
* Minimum supported Rust version (MSRV) is now 1.52.
* Bump `prost` version to 0.8. [#197]
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
* Minimum supported Rust version (MSRV) is now 1.52.

[#197]: https://github.com/actix/actix-extras/pull/197
[#203]: https://github.com/actix/actix-extras/pull/203


## 0.7.0-beta.1 - 2020-06-27
Expand Down
2 changes: 1 addition & 1 deletion actix-protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ path = "src/lib.rs"

[dependencies]
actix-rt = "2"
actix-web = { version = "4.0.0-beta.8", default_features = false }
actix-web = { version = "4.0.0-beta.10", default_features = false }
derive_more = "0.99.5"
futures-util = { version = "0.3.7", default-features = false }
prost = { version = "0.8", default_features = false }
Expand Down
2 changes: 1 addition & 1 deletion actix-protobuf/examples/prost-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
]

[dependencies]
actix-web = "4.0.0-beta.8"
actix-web = "4.0.0-beta.10"
actix-protobuf = { path = "../../" }

env_logger = "0.8"
Expand Down
1 change: 0 additions & 1 deletion actix-protobuf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ impl<T> FromRequest for ProtoBuf<T>
where
T: Message + Default + 'static,
{
type Config = ProtoBufConfig;
type Error = Error;
type Future = LocalBoxFuture<'static, Result<Self, Error>>;

Expand Down
3 changes: 3 additions & 0 deletions actix-redis/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changes

## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
* Minimum supported Rust version (MSRV) is now 1.52.

[#203]: https://github.com/actix/actix-extras/pull/203


## 0.10.0-beta.2 - 2020-06-27
* No notable changes.
Expand Down
8 changes: 4 additions & 4 deletions actix-redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ web = [
actix = { version = "0.12.0", default-features = false }
actix-rt = { version = "2.1", default-features = false }
actix-service = "2.0.0"
actix-tls = { version = "3.0.0-beta.5", default-features = false, features = ["connect"] }
actix-tls = { version = "3.0.0-beta.7", default-features = false, features = ["connect"] }

log = "0.4.6"
backoff = "0.2.1"
Expand All @@ -45,15 +45,15 @@ tokio = { version = "1", features = ["sync"] }
tokio-util = "0.6.1"

# actix-session
actix-web = { version = "4.0.0-beta.8", default_features = false, optional = true }
actix-web = { version = "4.0.0-beta.10", default_features = false, optional = true }
actix-session = { version = "0.5.0-beta.2", optional = true }
rand = { version = "0.8.0", optional = true }
serde = { version = "1.0.101", optional = true }
serde_json = { version = "1.0.40", optional = true }

[dev-dependencies]
actix-test = "0.1.0-beta.3"
actix-http = "3.0.0-beta.8"
actix-test = "0.1.0-beta.5"
actix-http = "3.0.0-beta.11"
actix-rt = "2.1"
env_logger = "0.8"
serde = { version = "1.0.101", features = ["derive"] }
Expand Down
4 changes: 3 additions & 1 deletion actix-session/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changes

## Unreleased - 2020-xx-xx
* Minimum supported Rust version (MSRV) is now 1.52.
* Impl `Clone` for `CookieSession`. [#201]
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
* Minimum supported Rust version (MSRV) is now 1.52.

[#201]: https://github.com/actix/actix-extras/pull/201
[#203]: https://github.com/actix/actix-extras/pull/203


## 0.5.0-beta.2 - 2020-06-27
Expand Down
2 changes: 1 addition & 1 deletion actix-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default = ["cookie-session"]
cookie-session = ["actix-web/secure-cookies"]

[dependencies]
actix-web = { version = "4.0.0-beta.8", default_features = false, features = ["cookies"] }
actix-web = { version = "4.0.0-beta.10", default_features = false, features = ["cookies"] }
actix-service = "2.0.0"

derive_more = "0.99.5"
Expand Down
25 changes: 12 additions & 13 deletions actix-session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ impl Session {
impl FromRequest for Session {
type Error = Error;
type Future = Ready<Result<Session, Error>>;
type Config = ();

#[inline]
fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future {
Expand All @@ -321,8 +320,8 @@ mod tests {

use super::*;

#[test]
fn session() {
#[actix_web::test]
async fn session() {
let mut req = test::TestRequest::default().to_srv_request();

Session::set_session(
Expand All @@ -342,8 +341,8 @@ mod tests {
assert_eq!(changes, [("key2".to_string(), "\"value2\"".to_string())]);
}

#[test]
fn get_session() {
#[actix_web::test]
async fn get_session() {
let mut req = test::TestRequest::default().to_srv_request();

Session::set_session(
Expand All @@ -356,8 +355,8 @@ mod tests {
assert_eq!(res, Some(true));
}

#[test]
fn get_session_from_request_head() {
#[actix_web::test]
async fn get_session_from_request_head() {
let mut req = test::TestRequest::default().to_srv_request();

Session::set_session(
Expand All @@ -370,26 +369,26 @@ mod tests {
assert_eq!(res, Some(10));
}

#[test]
fn purge_session() {
#[actix_web::test]
async fn purge_session() {
let req = test::TestRequest::default().to_srv_request();
let session = Session::get_session(&mut *req.extensions_mut());
assert_eq!(session.0.borrow().status, SessionStatus::Unchanged);
session.purge();
assert_eq!(session.0.borrow().status, SessionStatus::Purged);
}

#[test]
fn renew_session() {
#[actix_web::test]
async fn renew_session() {
let req = test::TestRequest::default().to_srv_request();
let session = Session::get_session(&mut *req.extensions_mut());
assert_eq!(session.0.borrow().status, SessionStatus::Unchanged);
session.renew();
assert_eq!(session.0.borrow().status, SessionStatus::Renewed);
}

#[test]
fn session_entries() {
#[actix_web::test]
async fn session_entries() {
let session = Session(Rc::new(RefCell::new(SessionInner::default())));
session.insert("test_str", "val").unwrap();
session.insert("test_num", 1).unwrap();
Expand Down
3 changes: 3 additions & 0 deletions actix-web-httpauth/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changes

## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to v4.0.0-beta.10. [#203]
* Minimum supported Rust version (MSRV) is now 1.52.

[#203]: https://github.com/actix/actix-extras/pull/203


## 0.6.0-beta.2 - 2020-06-27
* No notable changes.
Expand Down
2 changes: 1 addition & 1 deletion actix-web-httpauth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "actix_web_httpauth"
path = "src/lib.rs"

[dependencies]
actix-web = { version = "4.0.0-beta.8", default_features = false }
actix-web = { version = "4.0.0-beta.10", default_features = false }
actix-service = "2.0.0"
base64 = "0.13"
futures-util = { version = "0.3.7", default-features = false }
Expand Down
3 changes: 1 addition & 2 deletions actix-web-httpauth/src/extractors/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ impl BasicAuth {

impl FromRequest for BasicAuth {
type Future = Ready<Result<Self, Self::Error>>;
type Config = Config;
type Error = AuthenticationError<Challenge>;

fn from_request(req: &HttpRequest, _: &mut Payload) -> <Self as FromRequest>::Future {
Expand All @@ -115,7 +114,7 @@ impl FromRequest for BasicAuth {
.map_err(|_| {
// TODO: debug! the original error
let challenge = req
.app_data::<Self::Config>()
.app_data::<Config>()
.map(|config| config.0.clone())
// TODO: Add trace! about `Default::default` call
.unwrap_or_else(Default::default);
Expand Down
3 changes: 1 addition & 2 deletions actix-web-httpauth/src/extractors/bearer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ impl BearerAuth {
}

impl FromRequest for BearerAuth {
type Config = Config;
type Future = Ready<Result<Self, Self::Error>>;
type Error = AuthenticationError<bearer::Bearer>;

Expand All @@ -113,7 +112,7 @@ impl FromRequest for BearerAuth {
.map(|auth| BearerAuth(auth.into_scheme()))
.map_err(|_| {
let bearer = req
.app_data::<Self::Config>()
.app_data::<Config>()
.map(|config| config.0.clone())
.unwrap_or_else(Default::default);

Expand Down

0 comments on commit 545873b

Please sign in to comment.