mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 01:21:10 +00:00
update MSRV to 1.65 (#3059)
This commit is contained in:
parent
1072d0dacf
commit
241da6e081
74 changed files with 202 additions and 166 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
|
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
|
||||||
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
|
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
|
||||||
version:
|
version:
|
||||||
- 1.59.0 # MSRV
|
- 1.65.0 # MSRV
|
||||||
- stable
|
- stable
|
||||||
|
|
||||||
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
||||||
|
@ -49,17 +49,9 @@ jobs:
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
uses: taiki-e/install-action@cargo-hack
|
uses: taiki-e/install-action@cargo-hack
|
||||||
|
|
||||||
- name: workaround MSRV issues
|
# - name: workaround MSRV issues
|
||||||
if: matrix.version != 'stable'
|
# if: matrix.version != 'stable'
|
||||||
run: |
|
# run: |
|
||||||
cargo install cargo-edit --version=0.8.0
|
|
||||||
cargo add const-str@0.3 --dev -p=actix-web
|
|
||||||
cargo add const-str@0.3 --dev -p=awc
|
|
||||||
|
|
||||||
- name: workaround MSRV issues
|
|
||||||
if: matrix.version != 'stable'
|
|
||||||
run: |
|
|
||||||
cargo update -p=zstd-sys --precise=2.0.1+zstd.1.5.2
|
|
||||||
|
|
||||||
- name: check minimal
|
- name: check minimal
|
||||||
run: cargo ci-check-min
|
run: cargo ci-check-min
|
||||||
|
|
3
.github/workflows/clippy-fmt.yml
vendored
3
.github/workflows/clippy-fmt.yml
vendored
|
@ -63,7 +63,8 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with: { toolchain: nightly }
|
# temp: unpin once https://github.com/rust-lang/rust/issues/113152 is fixed
|
||||||
|
with: { toolchain: nightly-2023-06-28 }
|
||||||
|
|
||||||
- uses: taiki-e/cache-cargo-install-action@v1
|
- uses: taiki-e/cache-cargo-install-action@v1
|
||||||
with: { tool: cargo-public-api }
|
with: { tool: cargo-public-api }
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 0.6.3 - 2023-01-21
|
## 0.6.3 - 2023-01-21
|
||||||
|
|
||||||
- XHTML files now use `Content-Disposition: inline` instead of `attachment`. [#2903]
|
- XHTML files now use `Content-Disposition: inline` instead of `attachment`. [#2903]
|
||||||
|
|
|
@ -11,7 +11,7 @@ homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web"
|
repository = "https://github.com/actix/actix-web"
|
||||||
categories = ["asynchronous", "web-programming::http-server"]
|
categories = ["asynchronous", "web-programming::http-server"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "actix_files"
|
name = "actix_files"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
|
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
|
||||||
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.3)](https://docs.rs/actix-files/0.6.3)
|
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.3)](https://docs.rs/actix-files/0.6.3)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![License](https://img.shields.io/crates/l/actix-files.svg)
|
![License](https://img.shields.io/crates/l/actix-files.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-files/0.6.3/status.svg)](https://deps.rs/crate/actix-files/0.6.3)
|
[![dependency status](https://deps.rs/crate/actix-files/0.6.3/status.svg)](https://deps.rs/crate/actix-files/0.6.3)
|
||||||
|
@ -15,4 +15,4 @@
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-files)
|
- [API Documentation](https://docs.rs/actix-files)
|
||||||
- [Example Project](https://github.com/actix/examples/tree/master/basics/static-files)
|
- [Example Project](https://github.com/actix/examples/tree/master/basics/static-files)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
|
@ -97,8 +97,6 @@ impl FromRequest for PathBufWrap {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::iter::FromIterator;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 3.1.0 - 2023-01-21
|
## 3.1.0 - 2023-01-21
|
||||||
|
|
||||||
- Minimum supported Rust version (MSRV) is now 1.59.
|
- Minimum supported Rust version (MSRV) is now 1.59.
|
||||||
|
|
|
@ -13,7 +13,7 @@ categories = [
|
||||||
"web-programming::websocket",
|
"web-programming::websocket",
|
||||||
]
|
]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = []
|
features = []
|
||||||
|
@ -41,12 +41,12 @@ bytes = "1"
|
||||||
futures-core = { version = "0.3.17", default-features = false }
|
futures-core = { version = "0.3.17", default-features = false }
|
||||||
http = "0.2.7"
|
http = "0.2.7"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
socket2 = "0.4"
|
socket2 = "0.5"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
slab = "0.4"
|
slab = "0.4"
|
||||||
serde_urlencoded = "0.7"
|
serde_urlencoded = "0.7"
|
||||||
tls-openssl = { version = "0.10.9", package = "openssl", optional = true }
|
tls-openssl = { version = "0.10.55", package = "openssl", optional = true }
|
||||||
tokio = { version = "1.24.2", features = ["sync"] }
|
tokio = { version = "1.24.2", features = ["sync"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-http-test?label=latest)](https://crates.io/crates/actix-http-test)
|
[![crates.io](https://img.shields.io/crates/v/actix-http-test?label=latest)](https://crates.io/crates/actix-http-test)
|
||||||
[![Documentation](https://docs.rs/actix-http-test/badge.svg?version=3.1.0)](https://docs.rs/actix-http-test/3.1.0)
|
[![Documentation](https://docs.rs/actix-http-test/badge.svg?version=3.1.0)](https://docs.rs/actix-http-test/3.1.0)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http-test)
|
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http-test)
|
||||||
<br>
|
<br>
|
||||||
[![Dependency Status](https://deps.rs/crate/actix-http-test/3.1.0/status.svg)](https://deps.rs/crate/actix-http-test/3.1.0)
|
[![Dependency Status](https://deps.rs/crate/actix-http-test/3.1.0/status.svg)](https://deps.rs/crate/actix-http-test/3.1.0)
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
## Documentation & Resources
|
## Documentation & Resources
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-http-test)
|
- [API Documentation](https://docs.rs/actix-http-test)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
- Add `body::to_body_limit()` function.
|
- Add `body::to_body_limit()` function.
|
||||||
- Add `body::BodyLimitExceeded` error type.
|
- Add `body::BodyLimitExceeded` error type.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 3.3.1 - 2023-03-02
|
## 3.3.1 - 2023-03-02
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -16,7 +16,7 @@ categories = [
|
||||||
"web-programming::websocket",
|
"web-programming::websocket",
|
||||||
]
|
]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
# features that docs.rs will build with
|
# features that docs.rs will build with
|
||||||
|
@ -105,20 +105,20 @@ actix-tls = { version = "3", features = ["openssl"] }
|
||||||
actix-web = "4"
|
actix-web = "4"
|
||||||
|
|
||||||
async-stream = "0.3"
|
async-stream = "0.3"
|
||||||
criterion = { version = "0.4", features = ["html_reports"] }
|
criterion = { version = "0.5", features = ["html_reports"] }
|
||||||
env_logger = "0.9"
|
env_logger = "0.10"
|
||||||
futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] }
|
futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] }
|
||||||
memchr = "2.4"
|
memchr = "2.4"
|
||||||
once_cell = "1.9"
|
once_cell = "1.9"
|
||||||
rcgen = "0.9"
|
rcgen = "0.11"
|
||||||
regex = "1.3"
|
regex = "1.3"
|
||||||
rustversion = "1"
|
rustversion = "1"
|
||||||
rustls-pemfile = "1"
|
rustls-pemfile = "1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
static_assertions = "1"
|
static_assertions = "1"
|
||||||
tls-openssl = { package = "openssl", version = "0.10.9" }
|
tls-openssl = { package = "openssl", version = "0.10.55" }
|
||||||
tls-rustls = { package = "rustls", version = "0.20.0" }
|
tls-rustls = { package = "rustls", version = "0.20" }
|
||||||
tokio = { version = "1.24.2", features = ["net", "rt", "macros"] }
|
tokio = { version = "1.24.2", features = ["net", "rt", "macros"] }
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-http?label=latest)](https://crates.io/crates/actix-http)
|
[![crates.io](https://img.shields.io/crates/v/actix-http?label=latest)](https://crates.io/crates/actix-http)
|
||||||
[![Documentation](https://docs.rs/actix-http/badge.svg?version=3.3.1)](https://docs.rs/actix-http/3.3.1)
|
[![Documentation](https://docs.rs/actix-http/badge.svg?version=3.3.1)](https://docs.rs/actix-http/3.3.1)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http.svg)
|
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-http/3.3.1/status.svg)](https://deps.rs/crate/actix-http/3.3.1)
|
[![dependency status](https://deps.rs/crate/actix-http/3.3.1/status.svg)](https://deps.rs/crate/actix-http/3.3.1)
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
## Documentation & Resources
|
## Documentation & Resources
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-http)
|
- [API Documentation](https://docs.rs/actix-http)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,6 @@ impl MessageBody for BoxBody {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use static_assertions::{assert_impl_all, assert_not_impl_any};
|
use static_assertions::{assert_impl_all, assert_not_impl_any};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{convert::TryFrom, io, marker::PhantomData, mem::MaybeUninit, task::Poll};
|
use std::{io, marker::PhantomData, mem::MaybeUninit, task::Poll};
|
||||||
|
|
||||||
use actix_codec::Decoder;
|
use actix_codec::Decoder;
|
||||||
use bytes::{Bytes, BytesMut};
|
use bytes::{Bytes, BytesMut};
|
||||||
|
|
|
@ -160,7 +160,6 @@ mod openssl {
|
||||||
|
|
||||||
#[cfg(feature = "rustls")]
|
#[cfg(feature = "rustls")]
|
||||||
mod rustls {
|
mod rustls {
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
use actix_service::ServiceFactoryExt as _;
|
use actix_service::ServiceFactoryExt as _;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
//! [`TryIntoHeaderPair`] trait and implementations.
|
//! [`TryIntoHeaderPair`] trait and implementations.
|
||||||
|
|
||||||
use std::convert::TryFrom as _;
|
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
Header, HeaderName, HeaderValue, InvalidHeaderName, InvalidHeaderValue, TryIntoHeaderValue,
|
Header, HeaderName, HeaderValue, InvalidHeaderName, InvalidHeaderValue, TryIntoHeaderValue,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
//! [`TryIntoHeaderValue`] trait and implementations.
|
//! [`TryIntoHeaderValue`] trait and implementations.
|
||||||
|
|
||||||
use std::convert::TryFrom as _;
|
|
||||||
|
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use http::{header::InvalidHeaderValue, Error as HttpError, HeaderValue};
|
use http::{header::InvalidHeaderValue, Error as HttpError, HeaderValue};
|
||||||
use mime::Mime;
|
use mime::Mime;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{convert::TryFrom, str::FromStr};
|
use std::str::FromStr;
|
||||||
|
|
||||||
use derive_more::{Display, Error};
|
use derive_more::{Display, Error};
|
||||||
use http::header::InvalidHeaderValue;
|
use http::header::InvalidHeaderValue;
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
use std::{
|
use std::fmt;
|
||||||
convert::{TryFrom, TryInto},
|
|
||||||
fmt,
|
|
||||||
};
|
|
||||||
|
|
||||||
use derive_more::{Display, Error};
|
use derive_more::{Display, Error};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{cmp, convert::TryFrom as _, fmt, str};
|
use std::{cmp, fmt, str};
|
||||||
|
|
||||||
use crate::error::ParseError;
|
use crate::error::ParseError;
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,6 @@ impl<P> fmt::Debug for Request<P> {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_basics() {
|
fn test_basics() {
|
||||||
|
|
|
@ -30,9 +30,9 @@ use crate::{
|
||||||
///
|
///
|
||||||
/// # Automatic HTTP Version Selection
|
/// # Automatic HTTP Version Selection
|
||||||
/// There are two ways to select the HTTP version of an incoming connection:
|
/// There are two ways to select the HTTP version of an incoming connection:
|
||||||
/// - One is to rely on the ALPN information that is provided when using a TLS (HTTPS); both
|
/// - One is to rely on the ALPN information that is provided when using TLS (HTTPS); both versions
|
||||||
/// versions are supported automatically when using either of the `.rustls()` or `.openssl()`
|
/// are supported automatically when using either of the `.rustls()` or `.openssl()` finalizing
|
||||||
/// finalizing methods.
|
/// methods.
|
||||||
/// - The other is to read the first few bytes of the TCP stream. This is the only viable approach
|
/// - The other is to read the first few bytes of the TCP stream. This is the only viable approach
|
||||||
/// for supporting H2C, which allows the HTTP/2 protocol to work over plaintext connections. Use
|
/// for supporting H2C, which allows the HTTP/2 protocol to work over plaintext connections. Use
|
||||||
/// the `.tcp_auto_h2c()` finalizing method to enable this behavior.
|
/// the `.tcp_auto_h2c()` finalizing method to enable this behavior.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use std::cmp::min;
|
use std::cmp::min;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use bytes::{Buf, BufMut, BytesMut};
|
use bytes::{Buf, BufMut, BytesMut};
|
||||||
use tracing::debug;
|
use tracing::debug;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
extern crate tls_rustls as rustls;
|
extern crate tls_rustls as rustls;
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
convert::{Infallible, TryFrom},
|
convert::Infallible,
|
||||||
io::{self, BufReader, Write},
|
io::{self, BufReader, Write},
|
||||||
net::{SocketAddr, TcpStream as StdTcpStream},
|
net::{SocketAddr, TcpStream as StdTcpStream},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 0.6.0 - 2023-02-26
|
## 0.6.0 - 2023-02-26
|
||||||
|
|
||||||
- Add `MultipartForm` derive macro.
|
- Add `MultipartForm` derive macro.
|
||||||
|
|
|
@ -7,7 +7,7 @@ keywords = ["http", "web", "framework", "async", "futures"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web.git"
|
repository = "https://github.com/actix/actix-web.git"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-multipart-derive?label=latest)](https://crates.io/crates/actix-multipart-derive)
|
[![crates.io](https://img.shields.io/crates/v/actix-multipart-derive?label=latest)](https://crates.io/crates/actix-multipart-derive)
|
||||||
[![Documentation](https://docs.rs/actix-multipart-derive/badge.svg?version=0.5.0)](https://docs.rs/actix-multipart-derive/0.5.0)
|
[![Documentation](https://docs.rs/actix-multipart-derive/badge.svg?version=0.5.0)](https://docs.rs/actix-multipart-derive/0.5.0)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart-derive.svg)
|
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart-derive.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-multipart-derive/0.5.0/status.svg)](https://deps.rs/crate/actix-multipart-derive/0.5.0)
|
[![dependency status](https://deps.rs/crate/actix-multipart-derive/0.5.0/status.svg)](https://deps.rs/crate/actix-multipart-derive/0.5.0)
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
## Documentation & Resources
|
## Documentation & Resources
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-multipart-derive)
|
- [API Documentation](https://docs.rs/actix-multipart-derive)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
use std::{collections::HashSet, convert::TryFrom as _};
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use darling::{FromDeriveInput, FromField, FromMeta};
|
use darling::{FromDeriveInput, FromField, FromMeta};
|
||||||
use parse_size::parse_size;
|
use parse_size::parse_size;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#[rustversion::stable(1.59)] // MSRV
|
#[rustversion::stable(1.65)] // MSRV
|
||||||
#[test]
|
#[test]
|
||||||
fn compile_macros() {
|
fn compile_macros() {
|
||||||
let t = trybuild::TestCases::new();
|
let t = trybuild::TestCases::new();
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 0.6.0 - 2023-02-26
|
## 0.6.0 - 2023-02-26
|
||||||
|
|
||||||
- Added `MultipartForm` typed data extractor. [#2883]
|
- Added `MultipartForm` typed data extractor. [#2883]
|
||||||
|
|
|
@ -10,7 +10,7 @@ keywords = ["http", "web", "framework", "async", "futures"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web.git"
|
repository = "https://github.com/actix/actix-web.git"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-multipart?label=latest)](https://crates.io/crates/actix-multipart)
|
[![crates.io](https://img.shields.io/crates/v/actix-multipart?label=latest)](https://crates.io/crates/actix-multipart)
|
||||||
[![Documentation](https://docs.rs/actix-multipart/badge.svg?version=0.6.0)](https://docs.rs/actix-multipart/0.6.0)
|
[![Documentation](https://docs.rs/actix-multipart/badge.svg?version=0.6.0)](https://docs.rs/actix-multipart/0.6.0)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart.svg)
|
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-multipart/0.6.0/status.svg)](https://deps.rs/crate/actix-multipart/0.6.0)
|
[![dependency status](https://deps.rs/crate/actix-multipart/0.6.0/status.svg)](https://deps.rs/crate/actix-multipart/0.6.0)
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
## Documentation & Resources
|
## Documentation & Resources
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-multipart)
|
- [API Documentation](https://docs.rs/actix-multipart)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
cell::{Cell, RefCell, RefMut},
|
cell::{Cell, RefCell, RefMut},
|
||||||
cmp,
|
cmp, fmt,
|
||||||
convert::TryFrom,
|
|
||||||
fmt,
|
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 0.5.1 - 2022-09-19
|
## 0.5.1 - 2022-09-19
|
||||||
|
|
||||||
- Correct typo in error string for `i32` deserialization. [#2876]
|
- Correct typo in error string for `i32` deserialization. [#2876]
|
||||||
|
|
|
@ -10,7 +10,7 @@ description = "Resource path matching and router"
|
||||||
keywords = ["actix", "router", "routing"]
|
keywords = ["actix", "router", "routing"]
|
||||||
repository = "https://github.com/actix/actix-web.git"
|
repository = "https://github.com/actix/actix-web.git"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "actix_router"
|
name = "actix_router"
|
||||||
|
@ -27,7 +27,7 @@ serde = "1"
|
||||||
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = { version = "0.4", features = ["html_reports"] }
|
criterion = { version = "0.5", features = ["html_reports"] }
|
||||||
http = "0.2.7"
|
http = "0.2.7"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
percent-encoding = "2.1"
|
percent-encoding = "2.1"
|
||||||
|
|
|
@ -1389,8 +1389,6 @@ mod tests {
|
||||||
#[cfg(feature = "http")]
|
#[cfg(feature = "http")]
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_urlencoded_param() {
|
fn parse_urlencoded_param() {
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
let re = ResourceDef::new("/user/{id}/test");
|
let re = ResourceDef::new("/user/{id}/test");
|
||||||
|
|
||||||
let mut path = Path::new("/user/2345/test");
|
let mut path = Path::new("/user/2345/test");
|
||||||
|
|
|
@ -65,7 +65,6 @@ impl ResourcePath for Url {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use http::Uri;
|
use http::Uri;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{Path, ResourceDef};
|
use crate::{Path, ResourceDef};
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 0.1.1 - 2023-02-26
|
## 0.1.1 - 2023-02-26
|
||||||
|
|
||||||
- Add `TestServerConfig::port()` setter method.
|
- Add `TestServerConfig::port()` setter method.
|
||||||
|
|
|
@ -16,7 +16,7 @@ categories = [
|
||||||
"web-programming::websocket",
|
"web-programming::websocket",
|
||||||
]
|
]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -43,6 +43,6 @@ log = "0.4"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
serde_urlencoded = "0.7"
|
serde_urlencoded = "0.7"
|
||||||
tls-openssl = { package = "openssl", version = "0.10.9", optional = true }
|
tls-openssl = { package = "openssl", version = "0.10.55", optional = true }
|
||||||
tls-rustls = { package = "rustls", version = "0.20.0", optional = true }
|
tls-rustls = { package = "rustls", version = "0.20", optional = true }
|
||||||
tokio = { version = "1.24.2", features = ["sync"] }
|
tokio = { version = "1.24.2", features = ["sync"] }
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 4.2.0 - 2023-01-21
|
## 4.2.0 - 2023-01-21
|
||||||
|
|
||||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||||
|
|
|
@ -7,7 +7,7 @@ keywords = ["actix", "http", "web", "framework", "async"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web"
|
repository = "https://github.com/actix/actix-web"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "actix_web_actors"
|
name = "actix_web_actors"
|
||||||
|
@ -32,7 +32,6 @@ actix-test = "0.1"
|
||||||
awc = { version = "3", default-features = false }
|
awc = { version = "3", default-features = false }
|
||||||
actix-web = { version = "4", features = ["macros"] }
|
actix-web = { version = "4", features = ["macros"] }
|
||||||
|
|
||||||
|
env_logger = "0.10"
|
||||||
|
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||||
mime = "0.3"
|
mime = "0.3"
|
||||||
|
|
||||||
env_logger = "0.9"
|
|
||||||
futures-util = { version = "0.3.17", default-features = false }
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-web-actors?label=latest)](https://crates.io/crates/actix-web-actors)
|
[![crates.io](https://img.shields.io/crates/v/actix-web-actors?label=latest)](https://crates.io/crates/actix-web-actors)
|
||||||
[![Documentation](https://docs.rs/actix-web-actors/badge.svg?version=4.2.0)](https://docs.rs/actix-web-actors/4.2.0)
|
[![Documentation](https://docs.rs/actix-web-actors/badge.svg?version=4.2.0)](https://docs.rs/actix-web-actors/4.2.0)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![License](https://img.shields.io/crates/l/actix-web-actors.svg)
|
![License](https://img.shields.io/crates/l/actix-web-actors.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-web-actors/4.2.0/status.svg)](https://deps.rs/crate/actix-web-actors/4.2.0)
|
[![dependency status](https://deps.rs/crate/actix-web-actors/4.2.0/status.svg)](https://deps.rs/crate/actix-web-actors/4.2.0)
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
## Documentation & Resources
|
## Documentation & Resources
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-web-actors)
|
- [API Documentation](https://docs.rs/actix-web-actors)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::VecDeque,
|
collections::VecDeque,
|
||||||
convert::TryFrom,
|
|
||||||
future::Future,
|
future::Future,
|
||||||
io, mem,
|
io, mem,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 4.2.0 - 2023-02-26
|
## 4.2.0 - 2023-02-26
|
||||||
|
|
||||||
- Add support for custom methods with the `#[route]` macro. [#2969]
|
- Add support for custom methods with the `#[route]` macro. [#2969]
|
||||||
|
|
|
@ -9,7 +9,7 @@ authors = [
|
||||||
"Rob Ede <robjtede@icloud.com>",
|
"Rob Ede <robjtede@icloud.com>",
|
||||||
]
|
]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-web-codegen?label=latest)](https://crates.io/crates/actix-web-codegen)
|
[![crates.io](https://img.shields.io/crates/v/actix-web-codegen?label=latest)](https://crates.io/crates/actix-web-codegen)
|
||||||
[![Documentation](https://docs.rs/actix-web-codegen/badge.svg?version=4.2.0)](https://docs.rs/actix-web-codegen/4.2.0)
|
[![Documentation](https://docs.rs/actix-web-codegen/badge.svg?version=4.2.0)](https://docs.rs/actix-web-codegen/4.2.0)
|
||||||
![Version](https://img.shields.io/badge/rustc-1.59+-ab6000.svg)
|
![Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
|
||||||
![License](https://img.shields.io/crates/l/actix-web-codegen.svg)
|
![License](https://img.shields.io/crates/l/actix-web-codegen.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-web-codegen/4.2.0/status.svg)](https://deps.rs/crate/actix-web-codegen/4.2.0)
|
[![dependency status](https://deps.rs/crate/actix-web-codegen/4.2.0/status.svg)](https://deps.rs/crate/actix-web-codegen/4.2.0)
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
## Documentation & Resources
|
## Documentation & Resources
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-web-codegen)
|
- [API Documentation](https://docs.rs/actix-web-codegen)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
||||||
## Compile Testing
|
## Compile Testing
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{collections::HashSet, convert::TryFrom};
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use actix_router::ResourceDef;
|
use actix_router::ResourceDef;
|
||||||
use proc_macro::TokenStream;
|
use proc_macro::TokenStream;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#[rustversion::stable(1.59)] // MSRV
|
#[rustversion::stable(1.65)] // MSRV
|
||||||
#[test]
|
#[test]
|
||||||
fn compile_macros() {
|
fn compile_macros() {
|
||||||
let t = trybuild::TestCases::new();
|
let t = trybuild::TestCases::new();
|
||||||
|
|
|
@ -8,10 +8,20 @@ error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String>
|
||||||
--> tests/trybuild/route-custom-lowercase.rs:14:55
|
--> tests/trybuild/route-custom-lowercase.rs:14:55
|
||||||
|
|
|
|
||||||
14 | let srv = actix_test::start(|| App::new().service(index));
|
14 | let srv = actix_test::start(|| App::new().service(index));
|
||||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future<Output = String> {index}`
|
||||||
| |
|
| |
|
||||||
| required by a bound introduced by this call
|
| required by a bound introduced by this call
|
||||||
|
|
|
|
||||||
|
= help: the following other types implement trait `HttpServiceFactory`:
|
||||||
|
(A, B)
|
||||||
|
(A, B, C)
|
||||||
|
(A, B, C, D)
|
||||||
|
(A, B, C, D, E)
|
||||||
|
(A, B, C, D, E, F)
|
||||||
|
(A, B, C, D, E, F, G)
|
||||||
|
(A, B, C, D, E, F, G, H)
|
||||||
|
(A, B, C, D, E, F, G, H, I)
|
||||||
|
and $N others
|
||||||
note: required by a bound in `App::<T>::service`
|
note: required by a bound in `App::<T>::service`
|
||||||
--> $WORKSPACE/actix-web/src/app.rs
|
--> $WORKSPACE/actix-web/src/app.rs
|
||||||
|
|
|
|
||||||
|
|
|
@ -5,15 +5,25 @@ error: HTTP method defined more than once: `GET`
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||||
--> tests/trybuild/route-duplicate-method-fail.rs:12:55
|
--> tests/trybuild/route-duplicate-method-fail.rs:12:55
|
||||||
|
|
|
|
||||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future<Output = String> {index}`
|
||||||
| |
|
| |
|
||||||
| required by a bound introduced by this call
|
| required by a bound introduced by this call
|
||||||
|
|
|
|
||||||
|
= help: the following other types implement trait `HttpServiceFactory`:
|
||||||
|
(A, B)
|
||||||
|
(A, B, C)
|
||||||
|
(A, B, C, D)
|
||||||
|
(A, B, C, D, E)
|
||||||
|
(A, B, C, D, E, F)
|
||||||
|
(A, B, C, D, E, F, G)
|
||||||
|
(A, B, C, D, E, F, G, H)
|
||||||
|
(A, B, C, D, E, F, G, H, I)
|
||||||
|
and $N others
|
||||||
note: required by a bound in `App::<T>::service`
|
note: required by a bound in `App::<T>::service`
|
||||||
--> $WORKSPACE/actix-web/src/app.rs
|
--> $WORKSPACE/actix-web/src/app.rs
|
||||||
|
|
|
|
||||||
| F: HttpServiceFactory + 'static,
|
| F: HttpServiceFactory + 'static,
|
||||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||||
|
|
|
@ -7,15 +7,25 @@ error: The #[route(..)] macro requires at least one `method` attribute
|
||||||
= note: this error originates in the attribute macro `route` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the attribute macro `route` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||||
--> tests/trybuild/route-missing-method-fail.rs:12:55
|
--> tests/trybuild/route-missing-method-fail.rs:12:55
|
||||||
|
|
|
|
||||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future<Output = String> {index}`
|
||||||
| |
|
| |
|
||||||
| required by a bound introduced by this call
|
| required by a bound introduced by this call
|
||||||
|
|
|
|
||||||
|
= help: the following other types implement trait `HttpServiceFactory`:
|
||||||
|
(A, B)
|
||||||
|
(A, B, C)
|
||||||
|
(A, B, C, D)
|
||||||
|
(A, B, C, D, E)
|
||||||
|
(A, B, C, D, E, F)
|
||||||
|
(A, B, C, D, E, F, G)
|
||||||
|
(A, B, C, D, E, F, G, H)
|
||||||
|
(A, B, C, D, E, F, G, H, I)
|
||||||
|
and $N others
|
||||||
note: required by a bound in `App::<T>::service`
|
note: required by a bound in `App::<T>::service`
|
||||||
--> $WORKSPACE/actix-web/src/app.rs
|
--> $WORKSPACE/actix-web/src/app.rs
|
||||||
|
|
|
|
||||||
| F: HttpServiceFactory + 'static,
|
| F: HttpServiceFactory + 'static,
|
||||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||||
|
|
|
@ -13,15 +13,25 @@ error: Invalid input for macro
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||||
--> tests/trybuild/routes-missing-args-fail.rs:13:55
|
--> tests/trybuild/routes-missing-args-fail.rs:13:55
|
||||||
|
|
|
|
||||||
13 | let srv = actix_test::start(|| App::new().service(index));
|
13 | let srv = actix_test::start(|| App::new().service(index));
|
||||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future<Output = String> {index}`
|
||||||
| |
|
| |
|
||||||
| required by a bound introduced by this call
|
| required by a bound introduced by this call
|
||||||
|
|
|
|
||||||
|
= help: the following other types implement trait `HttpServiceFactory`:
|
||||||
|
(A, B)
|
||||||
|
(A, B, C)
|
||||||
|
(A, B, C, D)
|
||||||
|
(A, B, C, D, E)
|
||||||
|
(A, B, C, D, E, F)
|
||||||
|
(A, B, C, D, E, F, G)
|
||||||
|
(A, B, C, D, E, F, G, H)
|
||||||
|
(A, B, C, D, E, F, G, H, I)
|
||||||
|
and $N others
|
||||||
note: required by a bound in `App::<T>::service`
|
note: required by a bound in `App::<T>::service`
|
||||||
--> $WORKSPACE/actix-web/src/app.rs
|
--> $WORKSPACE/actix-web/src/app.rs
|
||||||
|
|
|
|
||||||
| F: HttpServiceFactory + 'static,
|
| F: HttpServiceFactory + 'static,
|
||||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||||
|
|
|
@ -7,15 +7,25 @@ error: The #[routes] macro requires at least one `#[<method>(..)]` attribute.
|
||||||
= note: this error originates in the attribute macro `routes` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the attribute macro `routes` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
error[E0277]: the trait bound `fn() -> impl std::future::Future<Output = String> {index}: HttpServiceFactory` is not satisfied
|
||||||
--> tests/trybuild/routes-missing-method-fail.rs:12:55
|
--> tests/trybuild/routes-missing-method-fail.rs:12:55
|
||||||
|
|
|
|
||||||
12 | let srv = actix_test::start(|| App::new().service(index));
|
12 | let srv = actix_test::start(|| App::new().service(index));
|
||||||
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future<Output = String> {index}`
|
| ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future<Output = String> {index}`
|
||||||
| |
|
| |
|
||||||
| required by a bound introduced by this call
|
| required by a bound introduced by this call
|
||||||
|
|
|
|
||||||
|
= help: the following other types implement trait `HttpServiceFactory`:
|
||||||
|
(A, B)
|
||||||
|
(A, B, C)
|
||||||
|
(A, B, C, D)
|
||||||
|
(A, B, C, D, E)
|
||||||
|
(A, B, C, D, E, F)
|
||||||
|
(A, B, C, D, E, F, G)
|
||||||
|
(A, B, C, D, E, F, G, H)
|
||||||
|
(A, B, C, D, E, F, G, H, I)
|
||||||
|
and $N others
|
||||||
note: required by a bound in `App::<T>::service`
|
note: required by a bound in `App::<T>::service`
|
||||||
--> $WORKSPACE/actix-web/src/app.rs
|
--> $WORKSPACE/actix-web/src/app.rs
|
||||||
|
|
|
|
||||||
| F: HttpServiceFactory + 'static,
|
| F: HttpServiceFactory + 'static,
|
||||||
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
| ^^^^^^^^^^^^^^^^^^ required by this bound in `App::<T>::service`
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Handler functions can now receive up to 16 extractor parameters.
|
- Handler functions can now receive up to 16 extractor parameters.
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 4.3.1 - 2023-02-26
|
## 4.3.1 - 2023-02-26
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ categories = [
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web.git"
|
repository = "https://github.com/actix/actix-web.git"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
# features that docs.rs will build with
|
# features that docs.rs will build with
|
||||||
|
@ -92,7 +92,7 @@ serde = "1.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_urlencoded = "0.7"
|
serde_urlencoded = "0.7"
|
||||||
smallvec = "1.6.1"
|
smallvec = "1.6.1"
|
||||||
socket2 = "0.4"
|
socket2 = "0.5"
|
||||||
time = { version = "0.3", default-features = false, features = ["formatting"] }
|
time = { version = "0.3", default-features = false, features = ["formatting"] }
|
||||||
url = "2.1"
|
url = "2.1"
|
||||||
|
|
||||||
|
@ -102,18 +102,18 @@ actix-test = { version = "0.1", features = ["openssl", "rustls"] }
|
||||||
awc = { version = "3", features = ["openssl"] }
|
awc = { version = "3", features = ["openssl"] }
|
||||||
|
|
||||||
brotli = "3.3.3"
|
brotli = "3.3.3"
|
||||||
const-str = "0.3"
|
const-str = "0.5"
|
||||||
criterion = { version = "0.4", features = ["html_reports"] }
|
criterion = { version = "0.5", features = ["html_reports"] }
|
||||||
env_logger = "0.9"
|
env_logger = "0.10"
|
||||||
flate2 = "1.0.13"
|
flate2 = "1.0.13"
|
||||||
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
rcgen = "0.9"
|
rcgen = "0.11"
|
||||||
rustls-pemfile = "1"
|
rustls-pemfile = "1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
static_assertions = "1"
|
static_assertions = "1"
|
||||||
tls-openssl = { package = "openssl", version = "0.10.9" }
|
tls-openssl = { package = "openssl", version = "0.10.55" }
|
||||||
tls-rustls = { package = "rustls", version = "0.20.0" }
|
tls-rustls = { package = "rustls", version = "0.20" }
|
||||||
tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] }
|
tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] }
|
||||||
zstd = "0.12"
|
zstd = "0.12"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-web?label=latest)](https://crates.io/crates/actix-web) [![Documentation](https://docs.rs/actix-web/badge.svg?version=4.3.1)](https://docs.rs/actix-web/4.3.1) ![MSRV](https://img.shields.io/badge/rustc-1.59+-ab6000.svg) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg) [![Dependency Status](https://deps.rs/crate/actix-web/4.3.1/status.svg)](https://deps.rs/crate/actix-web/4.3.1) <br /> [![CI](https://github.com/actix/actix-web/actions/workflows/ci.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/actix/actix-web/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-web) ![downloads](https://img.shields.io/crates/d/actix-web.svg) [![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
|
[![crates.io](https://img.shields.io/crates/v/actix-web?label=latest)](https://crates.io/crates/actix-web) [![Documentation](https://docs.rs/actix-web/badge.svg?version=4.3.1)](https://docs.rs/actix-web/4.3.1) ![MSRV](https://img.shields.io/badge/rustc-1.65+-ab6000.svg) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg) [![Dependency Status](https://deps.rs/crate/actix-web/4.3.1/status.svg)](https://deps.rs/crate/actix-web/4.3.1) <br /> [![CI](https://github.com/actix/actix-web/actions/workflows/ci.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/actix/actix-web/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-web) ![downloads](https://img.shields.io/crates/d/actix-web.svg) [![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
- SSL support using OpenSSL or Rustls
|
- SSL support using OpenSSL or Rustls
|
||||||
- Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
|
- Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
|
||||||
- Integrates with the [`awc` HTTP client](https://docs.rs/awc/)
|
- Integrates with the [`awc` HTTP client](https://docs.rs/awc/)
|
||||||
- Runs on stable Rust 1.59+
|
- Runs on stable Rust 1.65+
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
cell::{Ref, RefMut},
|
cell::{Ref, RefMut},
|
||||||
convert::TryFrom,
|
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//! For middleware documentation, see [`DefaultHeaders`].
|
//! For middleware documentation, see [`DefaultHeaders`].
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
convert::TryFrom,
|
|
||||||
future::Future,
|
future::Future,
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
|
|
|
@ -270,8 +270,8 @@ impl<B> ErrorHandlers<B> {
|
||||||
handlers
|
handlers
|
||||||
.get(status)
|
.get(status)
|
||||||
.map(|h| h.as_ref())
|
.map(|h| h.as_ref())
|
||||||
.or_else(|| status.is_client_error().then(|| default_client).flatten())
|
.or_else(|| status.is_client_error().then_some(default_client).flatten())
|
||||||
.or_else(|| status.is_server_error().then(|| default_server).flatten())
|
.or_else(|| status.is_server_error().then_some(default_server).flatten())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
collections::HashSet,
|
collections::HashSet,
|
||||||
convert::TryFrom,
|
|
||||||
env,
|
env,
|
||||||
fmt::{self, Display as _},
|
fmt::{self, Display as _},
|
||||||
future::Future,
|
future::Future,
|
||||||
|
|
|
@ -15,11 +15,12 @@ use crate::{
|
||||||
///
|
///
|
||||||
/// The default is `TrailingSlash::Trim`.
|
/// The default is `TrailingSlash::Trim`.
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy, Default)]
|
||||||
pub enum TrailingSlash {
|
pub enum TrailingSlash {
|
||||||
/// Trim trailing slashes from the end of the path.
|
/// Trim trailing slashes from the end of the path.
|
||||||
///
|
///
|
||||||
/// Using this will require all routes to omit trailing slashes for them to be accessible.
|
/// Using this will require all routes to omit trailing slashes for them to be accessible.
|
||||||
|
#[default]
|
||||||
Trim,
|
Trim,
|
||||||
|
|
||||||
/// Only merge any present multiple trailing slashes.
|
/// Only merge any present multiple trailing slashes.
|
||||||
|
@ -33,12 +34,6 @@ pub enum TrailingSlash {
|
||||||
Always,
|
Always,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TrailingSlash {
|
|
||||||
fn default() -> Self {
|
|
||||||
TrailingSlash::Trim
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Middleware for normalizing a request's path so that routes can be matched more flexibly.
|
/// Middleware for normalizing a request's path so that routes can be matched more flexibly.
|
||||||
///
|
///
|
||||||
/// # Normalization Steps
|
/// # Normalization Steps
|
||||||
|
|
|
@ -27,7 +27,6 @@ use crate::{
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// # use actix_web::{web, HttpResponse, HttpRequest, Responder, HttpMessage as _};
|
/// # use actix_web::{web, HttpResponse, HttpRequest, Responder, HttpMessage as _};
|
||||||
///
|
|
||||||
/// #[derive(Debug, Clone, PartialEq)]
|
/// #[derive(Debug, Clone, PartialEq)]
|
||||||
/// struct FlagFromMiddleware(String);
|
/// struct FlagFromMiddleware(String);
|
||||||
///
|
///
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use std::{
|
use std::{
|
||||||
cell::{Ref, RefMut},
|
cell::{Ref, RefMut},
|
||||||
convert::TryInto,
|
|
||||||
future::Future,
|
future::Future,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
task::{Context, Poll},
|
task::{Context, Poll},
|
||||||
|
|
|
@ -136,7 +136,7 @@ impl ResourceMap {
|
||||||
.root_rmap_fn(String::with_capacity(AVG_PATH_LEN), |mut acc, node| {
|
.root_rmap_fn(String::with_capacity(AVG_PATH_LEN), |mut acc, node| {
|
||||||
node.pattern
|
node.pattern
|
||||||
.resource_path_from_iter(&mut acc, &mut elements)
|
.resource_path_from_iter(&mut acc, &mut elements)
|
||||||
.then(|| acc)
|
.then_some(acc)
|
||||||
})
|
})
|
||||||
.ok_or(UrlGenerationError::NotEnoughElements)?;
|
.ok_or(UrlGenerationError::NotEnoughElements)?;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ impl ResourceMap {
|
||||||
// external resource; third slash would be the root slash in the path
|
// external resource; third slash would be the root slash in the path
|
||||||
let third_slash_index = path
|
let third_slash_index = path
|
||||||
.char_indices()
|
.char_indices()
|
||||||
.filter_map(|(i, c)| (c == '/').then(|| i))
|
.filter_map(|(i, c)| (c == '/').then_some(i))
|
||||||
.nth(2)
|
.nth(2)
|
||||||
.unwrap_or(path.len());
|
.unwrap_or(path.len());
|
||||||
|
|
||||||
|
|
|
@ -359,7 +359,6 @@ where
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
## Unreleased - 2023-xx-xx
|
## Unreleased - 2023-xx-xx
|
||||||
|
|
||||||
|
- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency.
|
||||||
|
|
||||||
## 3.1.1 - 2023-02-26
|
## 3.1.1 - 2023-02-26
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -13,7 +13,7 @@ categories = [
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web.git"
|
repository = "https://github.com/actix/actix-web.git"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "awc"
|
name = "awc"
|
||||||
|
@ -83,8 +83,8 @@ tokio = { version = "1.24.2", features = ["sync"] }
|
||||||
|
|
||||||
cookie = { version = "0.16", features = ["percent-encode"], optional = true }
|
cookie = { version = "0.16", features = ["percent-encode"], optional = true }
|
||||||
|
|
||||||
tls-openssl = { package = "openssl", version = "0.10.9", optional = true }
|
tls-openssl = { package = "openssl", version = "0.10.55", optional = true }
|
||||||
tls-rustls = { package = "rustls", version = "0.20.0", optional = true, features = ["dangerous_configuration"] }
|
tls-rustls = { package = "rustls", version = "0.20", optional = true, features = ["dangerous_configuration"] }
|
||||||
|
|
||||||
trust-dns-resolver = { version = "0.22", optional = true }
|
trust-dns-resolver = { version = "0.22", optional = true }
|
||||||
|
|
||||||
|
@ -98,12 +98,12 @@ actix-utils = "3"
|
||||||
actix-web = { version = "4", features = ["openssl"] }
|
actix-web = { version = "4", features = ["openssl"] }
|
||||||
|
|
||||||
brotli = "3.3.3"
|
brotli = "3.3.3"
|
||||||
const-str = "0.3"
|
const-str = "0.5"
|
||||||
env_logger = "0.9"
|
env_logger = "0.10"
|
||||||
flate2 = "1.0.13"
|
flate2 = "1.0.13"
|
||||||
futures-util = { version = "0.3.17", default-features = false }
|
futures-util = { version = "0.3.17", default-features = false }
|
||||||
static_assertions = "1.1"
|
static_assertions = "1.1"
|
||||||
rcgen = "0.9"
|
rcgen = "0.11"
|
||||||
rustls-pemfile = "1"
|
rustls-pemfile = "1"
|
||||||
tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] }
|
tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] }
|
||||||
zstd = "0.12"
|
zstd = "0.12"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/awc)
|
- [API Documentation](https://docs.rs/awc)
|
||||||
- [Example Project](https://github.com/actix/examples/tree/master/https-tls/awc-https)
|
- [Example Project](https://github.com/actix/examples/tree/master/https-tls/awc-https)
|
||||||
- Minimum Supported Rust Version (MSRV): 1.59
|
- Minimum Supported Rust Version (MSRV): 1.65
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{convert::TryFrom, fmt, net::IpAddr, rc::Rc, time::Duration};
|
use std::{fmt, net::IpAddr, rc::Rc, time::Duration};
|
||||||
|
|
||||||
use base64::prelude::*;
|
use base64::prelude::*;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! HTTP client.
|
//! HTTP client.
|
||||||
|
|
||||||
use std::{convert::TryFrom, rc::Rc, time::Duration};
|
use std::{rc::Rc, time::Duration};
|
||||||
|
|
||||||
use actix_http::{error::HttpError, header::HeaderMap, Method, RequestHead, Uri};
|
use actix_http::{error::HttpError, header::HeaderMap, Method, RequestHead, Uri};
|
||||||
use actix_rt::net::TcpStream;
|
use actix_rt::net::TcpStream;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use std::{
|
use std::{
|
||||||
convert::TryFrom,
|
|
||||||
future::Future,
|
future::Future,
|
||||||
net::SocketAddr,
|
net::SocketAddr,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{convert::TryFrom, fmt, net, rc::Rc, time::Duration};
|
use std::{fmt, net, rc::Rc, time::Duration};
|
||||||
|
|
||||||
use base64::prelude::*;
|
use base64::prelude::*;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
use std::{convert::TryFrom, fmt, net::SocketAddr, str};
|
use std::{fmt, net::SocketAddr, str};
|
||||||
|
|
||||||
use base64::prelude::*;
|
use base64::prelude::*;
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
msrv = "1.59"
|
msrv = "1.65"
|
||||||
|
|
Loading…
Reference in a new issue