From 56028e2f37476028fbe8c092cef7f65a06b0c7c2 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 17 Jul 2023 01:59:46 +0100 Subject: [PATCH] bump MSRV to 1.65 --- .github/workflows/ci.yml | 2 +- Cargo.toml | 4 ++++ README.md | 2 +- actix-codec/CHANGES.md | 2 +- actix-codec/Cargo.toml | 4 ++-- actix-macros/CHANGES.md | 2 +- actix-macros/Cargo.toml | 4 ++-- actix-macros/tests/trybuild.rs | 2 +- actix-rt/CHANGES.md | 2 +- actix-rt/Cargo.toml | 4 ++-- actix-server/CHANGES.md | 2 +- actix-server/Cargo.toml | 4 ++-- actix-service/CHANGES.md | 2 +- actix-service/Cargo.toml | 4 ++-- actix-tls/CHANGES.md | 2 +- actix-tls/Cargo.toml | 4 ++-- actix-tls/src/accept/mod.rs | 38 +++++++++++++++++----------------- actix-tracing/CHANGES.md | 2 +- actix-tracing/Cargo.toml | 4 ++-- actix-utils/CHANGES.md | 2 +- actix-utils/Cargo.toml | 4 ++-- bytestring/Cargo.toml | 4 ++-- local-channel/CHANGES.md | 2 +- local-channel/Cargo.toml | 4 ++-- local-waker/CHANGES.md | 2 +- local-waker/Cargo.toml | 4 ++-- 26 files changed, 58 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f59d79e9..cd9c5848 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - { name: Windows (MinGW), os: windows-latest, triple: x86_64-pc-windows-gnu } - { name: Windows (32-bit), os: windows-latest, triple: i686-pc-windows-msvc } version: - - 1.60.0 + - 1.65.0 # MSRV - stable name: ${{ matrix.target.name }} / ${{ matrix.version }} diff --git a/Cargo.toml b/Cargo.toml index ccd36595..62897764 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,10 @@ members = [ ] resolver = "2" +[workspace.package] +edition = "2021" +rust-version = "1.65" + [patch.crates-io] actix-codec = { path = "actix-codec" } actix-macros = { path = "actix-macros" } diff --git a/README.md b/README.md index fdf829f5..9d99d5ee 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ See example folders for [`actix-server`](./actix-server/examples) and [`actix-tl ## MSRV -Crates in this repo currently have a Minimum Supported Rust Version (MSRV) of 1.60. As a policy, we permit MSRV increases in non-breaking releases. +Crates in this repo currently have a Minimum Supported Rust Version (MSRV) of 1.65. As a policy, we permit MSRV increases in non-breaking releases. ## License diff --git a/actix-codec/CHANGES.md b/actix-codec/CHANGES.md index ebb867cf..14dc78c5 100644 --- a/actix-codec/CHANGES.md +++ b/actix-codec/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 0.5.1 - 2022-03-15 diff --git a/actix-codec/Cargo.toml b/actix-codec/Cargo.toml index 565bc830..d8f072df 100644 --- a/actix-codec/Cargo.toml +++ b/actix-codec/Cargo.toml @@ -10,8 +10,8 @@ keywords = ["network", "framework", "async", "futures"] repository = "https://github.com/actix/actix-net" categories = ["network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies] bitflags = "2" diff --git a/actix-macros/CHANGES.md b/actix-macros/CHANGES.md index 1badd6b7..9385808c 100644 --- a/actix-macros/CHANGES.md +++ b/actix-macros/CHANGES.md @@ -3,7 +3,7 @@ ## Unreleased - 2023-xx-xx - Update `syn` dependency to `2`. -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 0.2.3 - 2021-10-19 diff --git a/actix-macros/Cargo.toml b/actix-macros/Cargo.toml index 902a6dd1..4aba5e53 100644 --- a/actix-macros/Cargo.toml +++ b/actix-macros/Cargo.toml @@ -10,8 +10,8 @@ description = "Macros for Actix system and runtime" repository = "https://github.com/actix/actix-net.git" categories = ["network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [lib] proc-macro = true diff --git a/actix-macros/tests/trybuild.rs b/actix-macros/tests/trybuild.rs index 7e399d49..b37b84ba 100644 --- a/actix-macros/tests/trybuild.rs +++ b/actix-macros/tests/trybuild.rs @@ -1,4 +1,4 @@ -#[rustversion::stable(1.60)] // MSRV +#[rustversion::stable(1.65)] // MSRV #[test] fn compile_macros() { let t = trybuild::TestCases::new(); diff --git a/actix-rt/CHANGES.md b/actix-rt/CHANGES.md index 547b7524..0cedbaa6 100644 --- a/actix-rt/CHANGES.md +++ b/actix-rt/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 2.8.0 - 2022-12-21 diff --git a/actix-rt/Cargo.toml b/actix-rt/Cargo.toml index fa5fc204..1256eefd 100644 --- a/actix-rt/Cargo.toml +++ b/actix-rt/Cargo.toml @@ -11,8 +11,8 @@ homepage = "https://actix.rs" repository = "https://github.com/actix/actix-net.git" categories = ["network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [features] default = ["macros"] diff --git a/actix-server/CHANGES.md b/actix-server/CHANGES.md index 1147dcbd..e98f9d2b 100644 --- a/actix-server/CHANGES.md +++ b/actix-server/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 2.2.0 - 2022-12-21 diff --git a/actix-server/Cargo.toml b/actix-server/Cargo.toml index ade711f4..5bc93853 100755 --- a/actix-server/Cargo.toml +++ b/actix-server/Cargo.toml @@ -12,8 +12,8 @@ categories = ["network-programming", "asynchronous"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-net.git" license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [features] default = [] diff --git a/actix-service/CHANGES.md b/actix-service/CHANGES.md index 0640c1cd..ee549941 100644 --- a/actix-service/CHANGES.md +++ b/actix-service/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 2.0.2 - 2021-12-18 diff --git a/actix-service/Cargo.toml b/actix-service/Cargo.toml index 74904634..dcb6652f 100644 --- a/actix-service/Cargo.toml +++ b/actix-service/Cargo.toml @@ -10,8 +10,8 @@ keywords = ["network", "framework", "async", "futures", "service"] categories = ["network-programming", "asynchronous", "no-std"] repository = "https://github.com/actix/actix-net" license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies] futures-core = { version = "0.3.17", default-features = false } diff --git a/actix-tls/CHANGES.md b/actix-tls/CHANGES.md index f4f248b2..0381e6de 100644 --- a/actix-tls/CHANGES.md +++ b/actix-tls/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 3.0.4 - 2022-03-15 diff --git a/actix-tls/Cargo.toml b/actix-tls/Cargo.toml index 9c463e2c..d65d675b 100755 --- a/actix-tls/Cargo.toml +++ b/actix-tls/Cargo.toml @@ -10,8 +10,8 @@ keywords = ["network", "tls", "ssl", "async", "transport"] repository = "https://github.com/actix/actix-net.git" categories = ["network-programming", "asynchronous", "cryptography"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [package.metadata.docs.rs] all-features = true diff --git a/actix-tls/src/accept/mod.rs b/actix-tls/src/accept/mod.rs index 13c4db37..1eee6720 100644 --- a/actix-tls/src/accept/mod.rs +++ b/actix-tls/src/accept/mod.rs @@ -56,6 +56,25 @@ pub enum TlsError { Service(SvcErr), } +impl TlsError { + /// Casts the infallible service error type returned from acceptors into caller's type. + /// + /// # Examples + /// ``` + /// # use std::convert::Infallible; + /// # use actix_tls::accept::TlsError; + /// let a: TlsError = TlsError::Tls(42); + /// let _b: TlsError = a.into_service_error(); + /// ``` + pub fn into_service_error(self) -> TlsError { + match self { + Self::Timeout => TlsError::Timeout, + Self::Tls(err) => TlsError::Tls(err), + Self::Service(err) => match err {}, + } + } +} + impl fmt::Display for TlsError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -80,25 +99,6 @@ where } } -impl TlsError { - /// Casts the infallible service error type returned from acceptors into caller's type. - /// - /// # Examples - /// ``` - /// # use std::convert::Infallible; - /// # use actix_tls::accept::TlsError; - /// let a: TlsError = TlsError::Tls(42); - /// let _b: TlsError = a.into_service_error(); - /// ``` - pub fn into_service_error(self) -> TlsError { - match self { - Self::Timeout => TlsError::Timeout, - Self::Tls(err) => TlsError::Tls(err), - Self::Service(err) => match err {}, - } - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/actix-tracing/CHANGES.md b/actix-tracing/CHANGES.md index f672659a..f61d3f2b 100644 --- a/actix-tracing/CHANGES.md +++ b/actix-tracing/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 0.1.0 - 2020-01-15 diff --git a/actix-tracing/Cargo.toml b/actix-tracing/Cargo.toml index 27dfbc22..829a4b85 100644 --- a/actix-tracing/Cargo.toml +++ b/actix-tracing/Cargo.toml @@ -9,8 +9,8 @@ repository = "https://github.com/actix/actix-net.git" documentation = "https://docs.rs/actix-tracing" categories = ["network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies] actix-service = "2" diff --git a/actix-utils/CHANGES.md b/actix-utils/CHANGES.md index af6434ab..fc7df208 100644 --- a/actix-utils/CHANGES.md +++ b/actix-utils/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 3.0.1 - 2022-10-21 diff --git a/actix-utils/Cargo.toml b/actix-utils/Cargo.toml index 38d8af5e..e3c2553f 100644 --- a/actix-utils/Cargo.toml +++ b/actix-utils/Cargo.toml @@ -10,8 +10,8 @@ keywords = ["network", "framework", "async", "futures"] categories = ["network-programming", "asynchronous"] repository = "https://github.com/actix/actix-net" license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies] pin-project-lite = "0.2" diff --git a/bytestring/Cargo.toml b/bytestring/Cargo.toml index 21da5a95..ab0e43c6 100644 --- a/bytestring/Cargo.toml +++ b/bytestring/Cargo.toml @@ -11,8 +11,8 @@ categories = ["no-std", "web-programming"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-net.git" license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies] bytes = { version = "1.2", default-features = false } diff --git a/local-channel/CHANGES.md b/local-channel/CHANGES.md index b1bad2f5..957adfd9 100644 --- a/local-channel/CHANGES.md +++ b/local-channel/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 0.1.3 - 2022-05-03 diff --git a/local-channel/Cargo.toml b/local-channel/Cargo.toml index 04a4b9b5..9e0f21b4 100644 --- a/local-channel/Cargo.toml +++ b/local-channel/Cargo.toml @@ -9,8 +9,8 @@ authors = [ repository = "https://github.com/actix/actix-net.git" keywords = ["channel", "local", "futures"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies] futures-core = "0.3.17" diff --git a/local-waker/CHANGES.md b/local-waker/CHANGES.md index 68f4348b..f8aadaa6 100644 --- a/local-waker/CHANGES.md +++ b/local-waker/CHANGES.md @@ -2,7 +2,7 @@ ## Unreleased - 2023-xx-xx -- Minimum supported Rust version (MSRV) is now 1.60. +- Minimum supported Rust version (MSRV) is now 1.65. ## 0.1.3 - 2022-05-03 diff --git a/local-waker/Cargo.toml b/local-waker/Cargo.toml index 1baa08c0..640c47e1 100644 --- a/local-waker/Cargo.toml +++ b/local-waker/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/actix/actix-net.git" keywords = ["waker", "local", "futures", "no-std"] categories = ["asynchronous", "no-std"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.60" +edition.workspace = true +rust-version.workspace = true [dependencies]