Skip to content

Commit

Permalink
update all packages to use actix-web v3 (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede authored Sep 11, 2020
1 parent 7e6bdf2 commit bad5f32
Show file tree
Hide file tree
Showing 22 changed files with 73 additions and 70 deletions.
1 change: 0 additions & 1 deletion .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
fail-fast: false
matrix:
version:
- 1.40.0
- 1.42.0

name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
Expand Down
19 changes: 7 additions & 12 deletions actix-cors/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
# Changes

## [unreleased]

* Minimum supported Rust version(MSRV) is now 1.40.0.
## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to 3.0.0.
* Minimum supported Rust version(MSRV) is now 1.42.0.
* Implement the Debug trait on all public types.

## [0.3.0-alpha.1] - 2020-03-11

## 0.3.0-alpha.1 - 2020-03-11
* Minimize `futures-*` dependencies
* Update `actix-web` dependency to 3.0.0-alpha.1

## [0.2.0] - 2019-12-20

## 0.2.0 - 2019-12-20
* Release

## [0.2.0-alpha.3] - 2019-12-07

## 0.2.0-alpha.3 - 2019-12-07
* Migrate to actix-web 2.0.0

* Bump `derive_more` crate version to 0.99.0

## [0.1.0] - 2019-06-15

## 0.1.0 - 2019-06-15
* Move cors middleware to separate crate
4 changes: 2 additions & 2 deletions actix-cors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ name = "actix_cors"
path = "src/lib.rs"

[dependencies]
actix-web = { version = "3.0.0-alpha.1", default_features = false }
actix-web = { version = "3.0.0", default_features = false }
actix-service = "1.0.1"
derive_more = "0.99.2"
futures-util = { version = "0.3.4", default-features = false }

[dev-dependencies]
actix-rt = "1.0.0"
actix-rt = "1.1.1"
4 changes: 2 additions & 2 deletions actix-cors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
//! ```
#![allow(clippy::borrow_interior_mutable_const, clippy::type_complexity)]
#![deny(missing_docs, missing_debug_implementations)]
#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)]

use std::collections::HashSet;
use std::convert::TryFrom;
Expand Down Expand Up @@ -695,7 +695,7 @@ where
LocalBoxFuture<'static, Result<Self::Response, Error>>,
>;

fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.service.poll_ready(cx)
}

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

## [unreleased]

* Minimum supported Rust version(MSRV) is now 1.40.0.
## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to 3.0.0.
* Minimum supported Rust version(MSRV) is now 1.42.0.

## [0.3.0-alpha.1] - 2020-03-14

Expand Down
8 changes: 4 additions & 4 deletions actix-identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ name = "actix_identity"
path = "src/lib.rs"

[dependencies]
actix-web = { version = "3.0.0-alpha.1", default-features = false, features = ["secure-cookies"] }
actix-service = "1.0.2"
actix-web = { version = "3.0.0", default-features = false, features = ["secure-cookies"] }
actix-service = "1.0.6"
futures-util = { version = "0.3.4", default-features = false }
serde = "1.0"
serde_json = "1.0"
time = { version = "0.2.7", default-features = false, features = ["std"] }

[dev-dependencies]
actix-rt = "1.0.0"
actix-http = "2.0.0-alpha.2"
actix-rt = "1.1.1"
actix-http = "2.0.0"
bytes = "0.5.3"
5 changes: 3 additions & 2 deletions actix-identity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
//! ```
#![allow(clippy::needless_doctest_main)]
#![deny(rust_2018_idioms)]

use std::cell::RefCell;
use std::future::Future;
Expand Down Expand Up @@ -274,7 +275,7 @@ where
type Error = Error;
type Future = LocalBoxFuture<'static, Result<Self::Response, Self::Error>>;

fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.service.borrow_mut().poll_ready(cx)
}

Expand Down Expand Up @@ -424,7 +425,7 @@ impl CookieIdentityInner {
})
}

fn parse(&self, cookie: Cookie) -> Option<CookieValue> {
fn parse(&self, cookie: Cookie<'_>) -> Option<CookieValue> {
let value: CookieValue = serde_json::from_str(cookie.value()).ok()?;
let now = SystemTime::now();
if let Some(visit_deadline) = self.visit_deadline {
Expand Down
4 changes: 2 additions & 2 deletions actix-protobuf/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changes

## unreleased

## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to 3.0.0.
* Minimum supported Rust version(MSRV) is now 1.42.0 to use `matches!` macro.

## 0.6.0-alpha.1 (2020-07-06)
Expand Down
6 changes: 3 additions & 3 deletions actix-protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ name = "actix_protobuf"
path = "src/lib.rs"

[dependencies]
actix-web = { version = "3.0.0", default_features = false }
actix-rt = "1.1.1"

bytes = "0.5"
futures-util = { version = "0.3.5", default-features = false }
derive_more = "0.99"

actix-rt = "1"
actix-web = { version = "3.0.0-alpha.3", default_features = false }

prost = "0.6.0"

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions actix-protobuf/examples/prost-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2018"
authors = ["kingxsp <[email protected]>", "Yuki Okushi <[email protected]>"]

[dependencies]
actix-web = "3.0.0"
actix-rt = "1"
actix-protobuf = { path = "../../" }

bytes = "0.5"
env_logger = "*"

prost = "0.6.0"
prost-derive = "0.6.0"

actix-rt = "1"
actix-web = "3.0.0-alpha.3"
actix-protobuf = { path="../../" }
6 changes: 4 additions & 2 deletions actix-protobuf/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(rust_2018_idioms)]

use derive_more::Display;
use std::fmt;
use std::future::Future;
Expand Down Expand Up @@ -78,7 +80,7 @@ impl<T: Message> fmt::Debug for ProtoBuf<T>
where
T: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "ProtoBuf: {:?}", self.0)
}
}
Expand All @@ -87,7 +89,7 @@ impl<T: Message> fmt::Display for ProtoBuf<T>
where
T: fmt::Display,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}
Expand Down
6 changes: 3 additions & 3 deletions actix-redis/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Changes

## unreleased

* Minimize `futures` dependency
## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to 3.0.0.
* Minimize `futures` dependency.

## [0.9.0-alpha.2]

Expand Down
20 changes: 14 additions & 6 deletions actix-redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,34 @@ path = "src/lib.rs"
default = ["web"]

# actix-web integration
web = ["actix-http/actors", "actix-service", "actix-web", "actix-session/cookie-session", "rand", "serde", "serde_json"]
web = [
"actix-http/actors",
"actix-service",
"actix-web",
"actix-session/cookie-session",
"rand",
"serde",
"serde_json"
]

[dependencies]
actix = "0.10.0-alpha.3"
actix = "0.10.0"
actix-utils = "1.0.3"

log = "0.4.6"
backoff = "0.2.1"
derive_more = "0.99.2"
futures-util = { version = "0.3.5", default-features = false }
redis-async = "0.6.1"
actix-rt = "1.0.0"
actix-rt = "1.1.1"
time = "0.2.9"
tokio = "0.2.6"
tokio-util = "0.3.0"

# actix-session
actix-web = { version = "3.0.0-alpha.2", default_features = false, optional = true }
actix-http = { version = "2.0.0-alpha.3", optional = true }
actix-service = { version = "1.0.0", optional = true }
actix-web = { version = "3.0.0", default_features = false, optional = true }
actix-http = { version = "2.0.0", optional = true }
actix-service = { version = "1.0.6", optional = true }
actix-session = { version = "0.4.0-alpha.1", optional = true }
rand = { version = "0.7.0", optional = true }
serde = { version = "1.0.101", optional = true }
Expand Down
3 changes: 3 additions & 0 deletions actix-redis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//! * [Chat on gitter](https://gitter.im/actix/actix)
//! * Cargo package: [actix-redis](https://crates.io/crates/actix-redis)
//! * Minimum supported Rust version: 1.40.0 or later
#![deny(rust_2018_idioms)]

mod redis;
pub use redis::{Command, RedisActor};

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

## unreleased
## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to 3.0.0.
* Minimum supported Rust version(MSRV) is now 1.42.0.

* Minimum supported Rust version(MSRV) is now 1.40.0.

## [0.4.0-alpha.1] - 2020-03-14

* Update the `time` dependency to 0.2.7
* Update the `actix-web` dependency to 3.0.0-alpha.1
* Long lasting auto-prolonged session [#1292]
Expand Down
6 changes: 3 additions & 3 deletions actix-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ default = ["cookie-session"]
cookie-session = ["actix-web/secure-cookies"]

[dependencies]
actix-web = { version = "3.0.0-alpha.1", default_features = false }
actix-service = "1.0.1"
actix-web = { version = "3.0.0", default_features = false }
actix-service = "1.0.6"
bytes = "0.5.3"
derive_more = "0.99.2"
futures-util = { version = "0.3.4", default-features = false }
Expand All @@ -30,4 +30,4 @@ serde_json = "1.0"
time = { version = "0.2.7", default-features = false, features = ["std"] }

[dev-dependencies]
actix-rt = "1.0.0"
actix-rt = "1"
2 changes: 1 addition & 1 deletion actix-session/src/cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ where
type Error = S::Error;
type Future = LocalBoxFuture<'static, Result<Self::Response, Self::Error>>;

fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.service.poll_ready(cx)
}

Expand Down
3 changes: 3 additions & 0 deletions actix-session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
//! .await
//! }
//! ```
#![deny(rust_2018_idioms)]

use std::cell::RefCell;
use std::collections::HashMap;
use std::rc::Rc;
Expand Down
12 changes: 4 additions & 8 deletions actix-web-httpauth/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Changelog
# Changes

All notable changes to this project will be documented in this file.
## Unreleased - 2020-xx-xx
* Update `actix-web` dependency to 3.0.0.
* Minimum supported Rust version(MSRV) is now 1.42.0.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## unreleased (for alpha version)

* Minimum supported Rust version(MSRV) is now 1.40.0.

## [0.4.2] - 2020-07-08
- Update the `base64` dependency to 0.12
Expand Down
6 changes: 3 additions & 3 deletions actix-web-httpauth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ name = "actix_web_httpauth"
path = "src/lib.rs"

[dependencies]
actix-web = { version = "^2.0", default_features = false }
actix-service = "1.0"
actix-web = { version = "3.0.0", default_features = false }
actix-service = "1.0.6"
futures-util = { version = "0.3", default-features = false }
bytes = "0.5"
base64 = "0.12"

[dev-dependencies]
actix-rt = "1.0"
actix-rt = "1"

[features]
default = []
Expand Down
6 changes: 1 addition & 5 deletions actix-web-httpauth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
//! [extractors]: https://actix.rs/docs/extractors/
//! [middleware]: ./middleware/
#![deny(bare_trait_objects)]
#![deny(missing_docs)]
#![deny(nonstandard_style)]
#![deny(rust_2018_idioms)]
#![deny(unused)]
#![deny(bare_trait_objects, missing_docs, nonstandard_style, rust_2018_idioms)]
#![deny(clippy::all)]

pub mod extractors;
Expand Down
2 changes: 1 addition & 1 deletion actix-web-httpauth/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ where
/// Ok(req)
/// } else {
/// let config = req.app_data::<Config>()
/// .map(|data| data.get_ref().clone())
/// .map(|data| data.clone())
/// .unwrap_or_else(Default::default)
/// .scope("urn:example:channel=HBO&urn:example:rating=G,PG-13");
///
Expand Down

0 comments on commit bad5f32

Please sign in to comment.