diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 22b92759a..221d2fb40 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ jobs:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
version:
- - 1.46.0 # MSRV
+ - 1.51.0 # MSRV
- stable
- nightly
diff --git a/CHANGES.md b/CHANGES.md
index 88295ec12..5325caf48 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,9 @@
### Added
* Re-export actix-service `ServiceFactory` in `dev` module. [#2325]
+### Changes
+* Minimum supported Rust version (MSRV) is now 1.51.
+
[#2325]: https://github.com/actix/actix-web/pull/2325
diff --git a/Cargo.toml b/Cargo.toml
index f2ce46ee1..cee401363 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,6 +24,7 @@ name = "actix_web"
path = "src/lib.rs"
[workspace]
+resolver = "2"
members = [
".",
"awc",
diff --git a/MIGRATION.md b/MIGRATION.md
index 785974366..9a70adb95 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -3,7 +3,8 @@
* The default `NormalizePath` behavior now strips trailing slashes by default. This was
previously documented to be the case in v3 but the behavior now matches. The effect is that
routes defined with trailing slashes will become inaccessible when
- using `NormalizePath::default()`.
+ using `NormalizePath::default()`. As such, calling `NormalizePath::default()` will log a warning.
+ It is advised that the `new` method be used instead.
Before: `#[get("/test/")]`
After: `#[get("/test")]`
diff --git a/README.md b/README.md
index 309a18466..33784d66a 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
[](https://crates.io/crates/actix-web)
[](https://docs.rs/actix-web/4.0.0-beta.8)
-[](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
+[](https://blog.rust-lang.org/2020/03/12/Rust-1.51.html)

[](https://deps.rs/crate/actix-web/4.0.0-beta.8)
@@ -32,7 +32,7 @@
* SSL support using OpenSSL or Rustls
* Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
* Includes an async [HTTP client](https://docs.rs/awc/)
-* Runs on stable Rust 1.46+
+* Runs on stable Rust 1.51+
## Documentation
diff --git a/actix-files/CHANGES.md b/actix-files/CHANGES.md
index db047c44c..533f72291 100644
--- a/actix-files/CHANGES.md
+++ b/actix-files/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+* Minimum supported Rust version (MSRV) is now 1.51.
## 0.6.0-beta.6 - 2021-06-26
diff --git a/actix-files/README.md b/actix-files/README.md
index 13c301c56..5815ef563 100644
--- a/actix-files/README.md
+++ b/actix-files/README.md
@@ -4,7 +4,7 @@
[](https://crates.io/crates/actix-files)
[](https://docs.rs/actix-files/0.6.0-beta.6)
-[](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
+[](https://blog.rust-lang.org/2020/03/12/Rust-1.51.html)

[](https://deps.rs/crate/actix-files/0.6.0-beta.6)
@@ -15,4 +15,4 @@
- [API Documentation](https://docs.rs/actix-files/)
- [Example Project](https://github.com/actix/examples/tree/master/basics/static_index)
-- Minimum supported Rust version: 1.46 or later
+- Minimum supported Rust version: 1.51 or later
diff --git a/actix-http-test/CHANGES.md b/actix-http-test/CHANGES.md
index 1dbd9a15b..39b6a3a66 100644
--- a/actix-http-test/CHANGES.md
+++ b/actix-http-test/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+* Minimum supported Rust version (MSRV) is now 1.51.
## 3.0.0-beta.4 - 2021-04-02
diff --git a/actix-http-test/README.md b/actix-http-test/README.md
index 74260a352..099fb385d 100644
--- a/actix-http-test/README.md
+++ b/actix-http-test/README.md
@@ -4,7 +4,7 @@
[](https://crates.io/crates/actix-http-test)
[](https://docs.rs/actix-http-test/3.0.0-beta.4)
-[](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
+[](https://blog.rust-lang.org/2020/03/12/Rust-1.51.html)

[](https://deps.rs/crate/actix-http-test/3.0.0-beta.4)
@@ -14,4 +14,4 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-http-test)
-- Minimum Supported Rust Version (MSRV): 1.46.0
+- Minimum Supported Rust Version (MSRV): 1.51.0
diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md
index 9ed28105f..63172e56d 100644
--- a/actix-http/CHANGES.md
+++ b/actix-http/CHANGES.md
@@ -1,11 +1,16 @@
# Changes
## Unreleased - 2021-xx-xx
+### Changes
+* Minimum supported Rust version (MSRV) is now 1.51.
### Fixed
* Remove slice creation pointing to potential uninitialized data on h1 encoder. [#2364]
+* Remove `Into` bound on `Encoder` body types. [#2375]
[#2364]: https://github.com/actix/actix-web/pull/2364
+[#2375]: https://github.com/actix/actix-web/pull/2375
+
## 3.0.0-beta.8 - 2021-08-09
### Fixed
diff --git a/actix-http/README.md b/actix-http/README.md
index 5b06583bc..c509eaff8 100644
--- a/actix-http/README.md
+++ b/actix-http/README.md
@@ -4,7 +4,7 @@
[](https://crates.io/crates/actix-http)
[](https://docs.rs/actix-http/3.0.0-beta.9)
-[](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
+[](https://blog.rust-lang.org/2020/03/12/Rust-1.51.html)

[](https://deps.rs/crate/actix-http/3.0.0-beta.9)
@@ -14,7 +14,7 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-http)
-- Minimum Supported Rust Version (MSRV): 1.46.0
+- Minimum Supported Rust Version (MSRV): 1.51.0
## Example
diff --git a/actix-http/src/body/body.rs b/actix-http/src/body/body.rs
index f04837d07..cd3e4c5c4 100644
--- a/actix-http/src/body/body.rs
+++ b/actix-http/src/body/body.rs
@@ -7,7 +7,7 @@ use std::{
};
use bytes::{Bytes, BytesMut};
-use futures_core::{ready, Stream};
+use futures_core::Stream;
use crate::error::Error;
@@ -74,14 +74,10 @@ impl MessageBody for AnyBody {
}
}
- // TODO: MSRV 1.51: poll_map_err
- AnyBody::Message(body) => match ready!(body.as_pin_mut().poll_next(cx)) {
- Some(Err(err)) => {
- Poll::Ready(Some(Err(Error::new_body().with_cause(err))))
- }
- Some(Ok(val)) => Poll::Ready(Some(Ok(val))),
- None => Poll::Ready(None),
- },
+ AnyBody::Message(body) => body
+ .as_pin_mut()
+ .poll_next(cx)
+ .map_err(|err| Error::new_body().with_cause(err)),
}
}
}
@@ -223,11 +219,9 @@ impl MessageBody for BoxAnyBody {
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll