mirror of
https://github.com/actix/actix-extras.git
synced 2024-12-02 19:12:24 +01:00
update all packages to use actix-web v3 (#94)
This commit is contained in:
parent
7e6bdf2eb2
commit
bad5f32a68
1
.github/workflows/msrv.yml
vendored
1
.github/workflows/msrv.yml
vendored
@ -13,7 +13,6 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- 1.40.0
|
|
||||||
- 1.42.0
|
- 1.42.0
|
||||||
|
|
||||||
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
|
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [unreleased]
|
## Unreleased - 2020-xx-xx
|
||||||
|
* Update `actix-web` dependency to 3.0.0.
|
||||||
* Minimum supported Rust version(MSRV) is now 1.40.0.
|
* Minimum supported Rust version(MSRV) is now 1.42.0.
|
||||||
* Implement the Debug trait on all public types.
|
* 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
|
* Minimize `futures-*` dependencies
|
||||||
* Update `actix-web` dependency to 3.0.0-alpha.1
|
* Update `actix-web` dependency to 3.0.0-alpha.1
|
||||||
|
|
||||||
## [0.2.0] - 2019-12-20
|
## 0.2.0 - 2019-12-20
|
||||||
|
|
||||||
* Release
|
* Release
|
||||||
|
|
||||||
## [0.2.0-alpha.3] - 2019-12-07
|
## 0.2.0-alpha.3 - 2019-12-07
|
||||||
|
|
||||||
* Migrate to actix-web 2.0.0
|
* Migrate to actix-web 2.0.0
|
||||||
|
|
||||||
* Bump `derive_more` crate version to 0.99.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
|
* Move cors middleware to separate crate
|
||||||
|
@ -16,10 +16,10 @@ name = "actix_cors"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[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"
|
actix-service = "1.0.1"
|
||||||
derive_more = "0.99.2"
|
derive_more = "0.99.2"
|
||||||
futures-util = { version = "0.3.4", default-features = false }
|
futures-util = { version = "0.3.4", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "1.0.0"
|
actix-rt = "1.1.1"
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
#![allow(clippy::borrow_interior_mutable_const, clippy::type_complexity)]
|
#![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::collections::HashSet;
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
@ -695,7 +695,7 @@ where
|
|||||||
LocalBoxFuture<'static, Result<Self::Response, Error>>,
|
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)
|
self.service.poll_ready(cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [unreleased]
|
## Unreleased - 2020-xx-xx
|
||||||
|
* Update `actix-web` dependency to 3.0.0.
|
||||||
* Minimum supported Rust version(MSRV) is now 1.40.0.
|
* Minimum supported Rust version(MSRV) is now 1.42.0.
|
||||||
|
|
||||||
## [0.3.0-alpha.1] - 2020-03-14
|
## [0.3.0-alpha.1] - 2020-03-14
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@ name = "actix_identity"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = { version = "3.0.0-alpha.1", default-features = false, features = ["secure-cookies"] }
|
actix-web = { version = "3.0.0", default-features = false, features = ["secure-cookies"] }
|
||||||
actix-service = "1.0.2"
|
actix-service = "1.0.6"
|
||||||
futures-util = { version = "0.3.4", default-features = false }
|
futures-util = { version = "0.3.4", default-features = false }
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
time = { version = "0.2.7", default-features = false, features = ["std"] }
|
time = { version = "0.2.7", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "1.0.0"
|
actix-rt = "1.1.1"
|
||||||
actix-http = "2.0.0-alpha.2"
|
actix-http = "2.0.0"
|
||||||
bytes = "0.5.3"
|
bytes = "0.5.3"
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
#![allow(clippy::needless_doctest_main)]
|
#![allow(clippy::needless_doctest_main)]
|
||||||
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
@ -274,7 +275,7 @@ where
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Future = LocalBoxFuture<'static, Result<Self::Response, Self::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)
|
self.service.borrow_mut().poll_ready(cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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 value: CookieValue = serde_json::from_str(cookie.value()).ok()?;
|
||||||
let now = SystemTime::now();
|
let now = SystemTime::now();
|
||||||
if let Some(visit_deadline) = self.visit_deadline {
|
if let Some(visit_deadline) = self.visit_deadline {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Changes
|
# 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.
|
* Minimum supported Rust version(MSRV) is now 1.42.0 to use `matches!` macro.
|
||||||
|
|
||||||
## 0.6.0-alpha.1 (2020-07-06)
|
## 0.6.0-alpha.1 (2020-07-06)
|
||||||
|
@ -16,13 +16,13 @@ name = "actix_protobuf"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
actix-web = { version = "3.0.0", default_features = false }
|
||||||
|
actix-rt = "1.1.1"
|
||||||
|
|
||||||
bytes = "0.5"
|
bytes = "0.5"
|
||||||
futures-util = { version = "0.3.5", default-features = false }
|
futures-util = { version = "0.3.5", default-features = false }
|
||||||
derive_more = "0.99"
|
derive_more = "0.99"
|
||||||
|
|
||||||
actix-rt = "1"
|
|
||||||
actix-web = { version = "3.0.0-alpha.3", default_features = false }
|
|
||||||
|
|
||||||
prost = "0.6.0"
|
prost = "0.6.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -5,12 +5,12 @@ edition = "2018"
|
|||||||
authors = ["kingxsp <jin.hb.zh@outlook.com>", "Yuki Okushi <huyuumi.dev@gmail.com>"]
|
authors = ["kingxsp <jin.hb.zh@outlook.com>", "Yuki Okushi <huyuumi.dev@gmail.com>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
actix-web = "3.0.0"
|
||||||
|
actix-rt = "1"
|
||||||
|
actix-protobuf = { path = "../../" }
|
||||||
|
|
||||||
bytes = "0.5"
|
bytes = "0.5"
|
||||||
env_logger = "*"
|
env_logger = "*"
|
||||||
|
|
||||||
prost = "0.6.0"
|
prost = "0.6.0"
|
||||||
prost-derive = "0.6.0"
|
prost-derive = "0.6.0"
|
||||||
|
|
||||||
actix-rt = "1"
|
|
||||||
actix-web = "3.0.0-alpha.3"
|
|
||||||
actix-protobuf = { path="../../" }
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
use derive_more::Display;
|
use derive_more::Display;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
@ -78,7 +80,7 @@ impl<T: Message> fmt::Debug for ProtoBuf<T>
|
|||||||
where
|
where
|
||||||
T: fmt::Debug,
|
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)
|
write!(f, "ProtoBuf: {:?}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,7 +89,7 @@ impl<T: Message> fmt::Display for ProtoBuf<T>
|
|||||||
where
|
where
|
||||||
T: fmt::Display,
|
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)
|
fmt::Display::fmt(&self.0, f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## unreleased
|
## Unreleased - 2020-xx-xx
|
||||||
|
* Update `actix-web` dependency to 3.0.0.
|
||||||
* Minimize `futures` dependency
|
* Minimize `futures` dependency.
|
||||||
|
|
||||||
## [0.9.0-alpha.2]
|
## [0.9.0-alpha.2]
|
||||||
|
|
||||||
|
@ -21,10 +21,18 @@ path = "src/lib.rs"
|
|||||||
default = ["web"]
|
default = ["web"]
|
||||||
|
|
||||||
# actix-web integration
|
# 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]
|
[dependencies]
|
||||||
actix = "0.10.0-alpha.3"
|
actix = "0.10.0"
|
||||||
actix-utils = "1.0.3"
|
actix-utils = "1.0.3"
|
||||||
|
|
||||||
log = "0.4.6"
|
log = "0.4.6"
|
||||||
@ -32,15 +40,15 @@ backoff = "0.2.1"
|
|||||||
derive_more = "0.99.2"
|
derive_more = "0.99.2"
|
||||||
futures-util = { version = "0.3.5", default-features = false }
|
futures-util = { version = "0.3.5", default-features = false }
|
||||||
redis-async = "0.6.1"
|
redis-async = "0.6.1"
|
||||||
actix-rt = "1.0.0"
|
actix-rt = "1.1.1"
|
||||||
time = "0.2.9"
|
time = "0.2.9"
|
||||||
tokio = "0.2.6"
|
tokio = "0.2.6"
|
||||||
tokio-util = "0.3.0"
|
tokio-util = "0.3.0"
|
||||||
|
|
||||||
# actix-session
|
# actix-session
|
||||||
actix-web = { version = "3.0.0-alpha.2", default_features = false, optional = true }
|
actix-web = { version = "3.0.0", default_features = false, optional = true }
|
||||||
actix-http = { version = "2.0.0-alpha.3", optional = true }
|
actix-http = { version = "2.0.0", optional = true }
|
||||||
actix-service = { version = "1.0.0", optional = true }
|
actix-service = { version = "1.0.6", optional = true }
|
||||||
actix-session = { version = "0.4.0-alpha.1", optional = true }
|
actix-session = { version = "0.4.0-alpha.1", optional = true }
|
||||||
rand = { version = "0.7.0", optional = true }
|
rand = { version = "0.7.0", optional = true }
|
||||||
serde = { version = "1.0.101", optional = true }
|
serde = { version = "1.0.101", optional = true }
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
//! * [Chat on gitter](https://gitter.im/actix/actix)
|
//! * [Chat on gitter](https://gitter.im/actix/actix)
|
||||||
//! * Cargo package: [actix-redis](https://crates.io/crates/actix-redis)
|
//! * Cargo package: [actix-redis](https://crates.io/crates/actix-redis)
|
||||||
//! * Minimum supported Rust version: 1.40.0 or later
|
//! * Minimum supported Rust version: 1.40.0 or later
|
||||||
|
|
||||||
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
mod redis;
|
mod redis;
|
||||||
pub use redis::{Command, RedisActor};
|
pub use redis::{Command, RedisActor};
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# Changes
|
# 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
|
## [0.4.0-alpha.1] - 2020-03-14
|
||||||
|
|
||||||
* Update the `time` dependency to 0.2.7
|
* Update the `time` dependency to 0.2.7
|
||||||
* Update the `actix-web` dependency to 3.0.0-alpha.1
|
* Update the `actix-web` dependency to 3.0.0-alpha.1
|
||||||
* Long lasting auto-prolonged session [#1292]
|
* Long lasting auto-prolonged session [#1292]
|
||||||
|
@ -20,8 +20,8 @@ default = ["cookie-session"]
|
|||||||
cookie-session = ["actix-web/secure-cookies"]
|
cookie-session = ["actix-web/secure-cookies"]
|
||||||
|
|
||||||
[dependencies]
|
[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"
|
actix-service = "1.0.6"
|
||||||
bytes = "0.5.3"
|
bytes = "0.5.3"
|
||||||
derive_more = "0.99.2"
|
derive_more = "0.99.2"
|
||||||
futures-util = { version = "0.3.4", default-features = false }
|
futures-util = { version = "0.3.4", default-features = false }
|
||||||
@ -30,4 +30,4 @@ serde_json = "1.0"
|
|||||||
time = { version = "0.2.7", default-features = false, features = ["std"] }
|
time = { version = "0.2.7", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "1.0.0"
|
actix-rt = "1"
|
||||||
|
@ -343,7 +343,7 @@ where
|
|||||||
type Error = S::Error;
|
type Error = S::Error;
|
||||||
type Future = LocalBoxFuture<'static, Result<Self::Response, Self::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)
|
self.service.poll_ready(cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,9 @@
|
|||||||
//! .await
|
//! .await
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
#![deny(rust_2018_idioms)]
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -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
|
## [0.4.2] - 2020-07-08
|
||||||
- Update the `base64` dependency to 0.12
|
- Update the `base64` dependency to 0.12
|
||||||
|
@ -17,14 +17,14 @@ name = "actix_web_httpauth"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = { version = "^2.0", default_features = false }
|
actix-web = { version = "3.0.0", default_features = false }
|
||||||
actix-service = "1.0"
|
actix-service = "1.0.6"
|
||||||
futures-util = { version = "0.3", default-features = false }
|
futures-util = { version = "0.3", default-features = false }
|
||||||
bytes = "0.5"
|
bytes = "0.5"
|
||||||
base64 = "0.12"
|
base64 = "0.12"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "1.0"
|
actix-rt = "1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -15,11 +15,7 @@
|
|||||||
//! [extractors]: https://actix.rs/docs/extractors/
|
//! [extractors]: https://actix.rs/docs/extractors/
|
||||||
//! [middleware]: ./middleware/
|
//! [middleware]: ./middleware/
|
||||||
|
|
||||||
#![deny(bare_trait_objects)]
|
#![deny(bare_trait_objects, missing_docs, nonstandard_style, rust_2018_idioms)]
|
||||||
#![deny(missing_docs)]
|
|
||||||
#![deny(nonstandard_style)]
|
|
||||||
#![deny(rust_2018_idioms)]
|
|
||||||
#![deny(unused)]
|
|
||||||
#![deny(clippy::all)]
|
#![deny(clippy::all)]
|
||||||
|
|
||||||
pub mod extractors;
|
pub mod extractors;
|
||||||
|
@ -107,7 +107,7 @@ where
|
|||||||
/// Ok(req)
|
/// Ok(req)
|
||||||
/// } else {
|
/// } else {
|
||||||
/// let config = req.app_data::<Config>()
|
/// let config = req.app_data::<Config>()
|
||||||
/// .map(|data| data.get_ref().clone())
|
/// .map(|data| data.clone())
|
||||||
/// .unwrap_or_else(Default::default)
|
/// .unwrap_or_else(Default::default)
|
||||||
/// .scope("urn:example:channel=HBO&urn:example:rating=G,PG-13");
|
/// .scope("urn:example:channel=HBO&urn:example:rating=G,PG-13");
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user