diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0511339d..10e80b751 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,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.59.0 # MSRV + - 1.65.0 # MSRV - stable name: ${{ matrix.target.name }} / ${{ matrix.version }} @@ -49,17 +49,9 @@ jobs: - name: Install cargo-hack uses: taiki-e/install-action@cargo-hack - - name: workaround MSRV issues - if: matrix.version != 'stable' - 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: workaround MSRV issues + # if: matrix.version != 'stable' + # run: | - name: check minimal run: cargo ci-check-min diff --git a/.github/workflows/clippy-fmt.yml b/.github/workflows/clippy-fmt.yml index a7da9b1c5..109165ce0 100644 --- a/.github/workflows/clippy-fmt.yml +++ b/.github/workflows/clippy-fmt.yml @@ -63,7 +63,8 @@ jobs: - uses: actions/checkout@v3 - 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 with: { tool: cargo-public-api } diff --git a/actix-files/CHANGES.md b/actix-files/CHANGES.md index d64380a8d..4e45ce517 100644 --- a/actix-files/CHANGES.md +++ b/actix-files/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 0.6.3 - 2023-01-21 - XHTML files now use `Content-Disposition: inline` instead of `attachment`. [#2903] diff --git a/actix-files/Cargo.toml b/actix-files/Cargo.toml index 41f3b1135..80c609d1d 100644 --- a/actix-files/Cargo.toml +++ b/actix-files/Cargo.toml @@ -11,7 +11,7 @@ homepage = "https://actix.rs" repository = "https://github.com/actix/actix-web" categories = ["asynchronous", "web-programming::http-server"] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [lib] name = "actix_files" diff --git a/actix-files/README.md b/actix-files/README.md index 8869ca436..f01fc8566 100644 --- a/actix-files/README.md +++ b/actix-files/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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) - [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 diff --git a/actix-files/src/path_buf.rs b/actix-files/src/path_buf.rs index 650f55247..c1983279b 100644 --- a/actix-files/src/path_buf.rs +++ b/actix-files/src/path_buf.rs @@ -97,8 +97,6 @@ impl FromRequest for PathBufWrap { #[cfg(test)] mod tests { - use std::iter::FromIterator; - use super::*; #[test] diff --git a/actix-http-test/CHANGES.md b/actix-http-test/CHANGES.md index ec31b6196..3b8c83b3c 100644 --- a/actix-http-test/CHANGES.md +++ b/actix-http-test/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 3.1.0 - 2023-01-21 - Minimum supported Rust version (MSRV) is now 1.59. diff --git a/actix-http-test/Cargo.toml b/actix-http-test/Cargo.toml index 12739fbd4..87422551d 100644 --- a/actix-http-test/Cargo.toml +++ b/actix-http-test/Cargo.toml @@ -13,7 +13,7 @@ categories = [ "web-programming::websocket", ] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] features = [] @@ -41,12 +41,12 @@ bytes = "1" futures-core = { version = "0.3.17", default-features = false } http = "0.2.7" log = "0.4" -socket2 = "0.4" +socket2 = "0.5" serde = "1" serde_json = "1" slab = "0.4" 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"] } [dev-dependencies] diff --git a/actix-http-test/README.md b/actix-http-test/README.md index 94f0e88a5..935be407f 100644 --- a/actix-http-test/README.md +++ b/actix-http-test/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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 - [API Documentation](https://docs.rs/actix-http-test) -- Minimum Supported Rust Version (MSRV): 1.59 +- Minimum Supported Rust Version (MSRV): 1.65 diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index aaf84d765..a105c02c1 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -7,6 +7,10 @@ - Add `body::to_body_limit()` function. - 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 ### Fixed diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 222a04c8f..6909b785f 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -16,7 +16,7 @@ categories = [ "web-programming::websocket", ] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] # features that docs.rs will build with @@ -105,20 +105,20 @@ actix-tls = { version = "3", features = ["openssl"] } actix-web = "4" async-stream = "0.3" -criterion = { version = "0.4", features = ["html_reports"] } -env_logger = "0.9" +criterion = { version = "0.5", features = ["html_reports"] } +env_logger = "0.10" futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] } memchr = "2.4" once_cell = "1.9" -rcgen = "0.9" +rcgen = "0.11" regex = "1.3" rustversion = "1" rustls-pemfile = "1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" static_assertions = "1" -tls-openssl = { package = "openssl", version = "0.10.9" } -tls-rustls = { package = "rustls", version = "0.20.0" } +tls-openssl = { package = "openssl", version = "0.10.55" } +tls-rustls = { package = "rustls", version = "0.20" } tokio = { version = "1.24.2", features = ["net", "rt", "macros"] } [[example]] diff --git a/actix-http/README.md b/actix-http/README.md index f372096ff..0c5fcb6b6 100644 --- a/actix-http/README.md +++ b/actix-http/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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 - [API Documentation](https://docs.rs/actix-http) -- Minimum Supported Rust Version (MSRV): 1.59 +- Minimum Supported Rust Version (MSRV): 1.65 ## Example diff --git a/actix-http/src/body/boxed.rs b/actix-http/src/body/boxed.rs index 5fcc42f56..2bbb75369 100644 --- a/actix-http/src/body/boxed.rs +++ b/actix-http/src/body/boxed.rs @@ -104,7 +104,6 @@ impl MessageBody for BoxBody { #[cfg(test)] mod tests { - use static_assertions::{assert_impl_all, assert_not_impl_any}; use super::*; diff --git a/actix-http/src/h1/decoder.rs b/actix-http/src/h1/decoder.rs index 0b06bfe24..829f40e10 100644 --- a/actix-http/src/h1/decoder.rs +++ b/actix-http/src/h1/decoder.rs @@ -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 bytes::{Bytes, BytesMut}; diff --git a/actix-http/src/h1/service.rs b/actix-http/src/h1/service.rs index a791ea8c3..9eebe2126 100644 --- a/actix-http/src/h1/service.rs +++ b/actix-http/src/h1/service.rs @@ -160,7 +160,6 @@ mod openssl { #[cfg(feature = "rustls")] mod rustls { - use std::io; use actix_service::ServiceFactoryExt as _; diff --git a/actix-http/src/header/into_pair.rs b/actix-http/src/header/into_pair.rs index 91c3e6640..0a71f857a 100644 --- a/actix-http/src/header/into_pair.rs +++ b/actix-http/src/header/into_pair.rs @@ -1,7 +1,5 @@ //! [`TryIntoHeaderPair`] trait and implementations. -use std::convert::TryFrom as _; - use super::{ Header, HeaderName, HeaderValue, InvalidHeaderName, InvalidHeaderValue, TryIntoHeaderValue, }; diff --git a/actix-http/src/header/into_value.rs b/actix-http/src/header/into_value.rs index 6d369ee65..253900633 100644 --- a/actix-http/src/header/into_value.rs +++ b/actix-http/src/header/into_value.rs @@ -1,7 +1,5 @@ //! [`TryIntoHeaderValue`] trait and implementations. -use std::convert::TryFrom as _; - use bytes::Bytes; use http::{header::InvalidHeaderValue, Error as HttpError, HeaderValue}; use mime::Mime; diff --git a/actix-http/src/header/shared/content_encoding.rs b/actix-http/src/header/shared/content_encoding.rs index bd25de704..c3b4bc4c2 100644 --- a/actix-http/src/header/shared/content_encoding.rs +++ b/actix-http/src/header/shared/content_encoding.rs @@ -1,4 +1,4 @@ -use std::{convert::TryFrom, str::FromStr}; +use std::str::FromStr; use derive_more::{Display, Error}; use http::header::InvalidHeaderValue; diff --git a/actix-http/src/header/shared/quality.rs b/actix-http/src/header/shared/quality.rs index c80dd0a8e..c2276cf1b 100644 --- a/actix-http/src/header/shared/quality.rs +++ b/actix-http/src/header/shared/quality.rs @@ -1,7 +1,4 @@ -use std::{ - convert::{TryFrom, TryInto}, - fmt, -}; +use std::fmt; use derive_more::{Display, Error}; diff --git a/actix-http/src/header/shared/quality_item.rs b/actix-http/src/header/shared/quality_item.rs index 0b35b5401..ee1fdb928 100644 --- a/actix-http/src/header/shared/quality_item.rs +++ b/actix-http/src/header/shared/quality_item.rs @@ -1,4 +1,4 @@ -use std::{cmp, convert::TryFrom as _, fmt, str}; +use std::{cmp, fmt, str}; use crate::error::ParseError; diff --git a/actix-http/src/requests/request.rs b/actix-http/src/requests/request.rs index ac358e8df..f4d605b39 100644 --- a/actix-http/src/requests/request.rs +++ b/actix-http/src/requests/request.rs @@ -234,7 +234,6 @@ impl

fmt::Debug for Request

{ #[cfg(test)] mod tests { use super::*; - use std::convert::TryFrom; #[test] fn test_basics() { diff --git a/actix-http/src/service.rs b/actix-http/src/service.rs index 22177b849..108b09c4e 100644 --- a/actix-http/src/service.rs +++ b/actix-http/src/service.rs @@ -30,9 +30,9 @@ use crate::{ /// /// # Automatic HTTP Version Selection /// 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 -/// versions are supported automatically when using either of the `.rustls()` or `.openssl()` -/// finalizing methods. +/// - One is to rely on the ALPN information that is provided when using TLS (HTTPS); both versions +/// are supported automatically when using either of the `.rustls()` or `.openssl()` finalizing +/// methods. /// - 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 /// the `.tcp_auto_h2c()` finalizing method to enable this behavior. diff --git a/actix-http/src/ws/frame.rs b/actix-http/src/ws/frame.rs index dddb03d18..ce6f1b256 100644 --- a/actix-http/src/ws/frame.rs +++ b/actix-http/src/ws/frame.rs @@ -1,5 +1,4 @@ use std::cmp::min; -use std::convert::TryFrom; use bytes::{Buf, BufMut, BytesMut}; use tracing::debug; diff --git a/actix-http/tests/test_rustls.rs b/actix-http/tests/test_rustls.rs index 0b8197a69..bf3a9243b 100644 --- a/actix-http/tests/test_rustls.rs +++ b/actix-http/tests/test_rustls.rs @@ -4,7 +4,7 @@ extern crate tls_rustls as rustls; use std::{ - convert::{Infallible, TryFrom}, + convert::Infallible, io::{self, BufReader, Write}, net::{SocketAddr, TcpStream as StdTcpStream}, sync::Arc, diff --git a/actix-multipart-derive/CHANGES.md b/actix-multipart-derive/CHANGES.md index 8dd7aa4d0..caf75aeb3 100644 --- a/actix-multipart-derive/CHANGES.md +++ b/actix-multipart-derive/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## Unreleased + +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 0.6.0 - 2023-02-26 - Add `MultipartForm` derive macro. diff --git a/actix-multipart-derive/Cargo.toml b/actix-multipart-derive/Cargo.toml index e0b78fa26..aca6de84a 100644 --- a/actix-multipart-derive/Cargo.toml +++ b/actix-multipart-derive/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["http", "web", "framework", "async", "futures"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-web.git" license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] diff --git a/actix-multipart-derive/README.md b/actix-multipart-derive/README.md index 44f08c7bd..b077d355c 100644 --- a/actix-multipart-derive/README.md +++ b/actix-multipart-derive/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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 - [API Documentation](https://docs.rs/actix-multipart-derive) -- Minimum Supported Rust Version (MSRV): 1.59 +- Minimum Supported Rust Version (MSRV): 1.65 diff --git a/actix-multipart-derive/src/lib.rs b/actix-multipart-derive/src/lib.rs index 2af023aec..9552ad2d9 100644 --- a/actix-multipart-derive/src/lib.rs +++ b/actix-multipart-derive/src/lib.rs @@ -8,7 +8,7 @@ #![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![cfg_attr(docsrs, feature(doc_auto_cfg))] -use std::{collections::HashSet, convert::TryFrom as _}; +use std::collections::HashSet; use darling::{FromDeriveInput, FromField, FromMeta}; use parse_size::parse_size; diff --git a/actix-multipart-derive/tests/trybuild.rs b/actix-multipart-derive/tests/trybuild.rs index 7b9f14ed7..829c1d771 100644 --- a/actix-multipart-derive/tests/trybuild.rs +++ b/actix-multipart-derive/tests/trybuild.rs @@ -1,4 +1,4 @@ -#[rustversion::stable(1.59)] // MSRV +#[rustversion::stable(1.65)] // MSRV #[test] fn compile_macros() { let t = trybuild::TestCases::new(); diff --git a/actix-multipart/CHANGES.md b/actix-multipart/CHANGES.md index 4bb120c61..410c8af17 100644 --- a/actix-multipart/CHANGES.md +++ b/actix-multipart/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 0.6.0 - 2023-02-26 - Added `MultipartForm` typed data extractor. [#2883] diff --git a/actix-multipart/Cargo.toml b/actix-multipart/Cargo.toml index a36fbffc0..384c0e151 100644 --- a/actix-multipart/Cargo.toml +++ b/actix-multipart/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["http", "web", "framework", "async", "futures"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-web.git" license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] diff --git a/actix-multipart/README.md b/actix-multipart/README.md index c4101e1ce..3e2a7a127 100644 --- a/actix-multipart/README.md +++ b/actix-multipart/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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 - [API Documentation](https://docs.rs/actix-multipart) -- Minimum Supported Rust Version (MSRV): 1.59 +- Minimum Supported Rust Version (MSRV): 1.65 diff --git a/actix-multipart/src/server.rs b/actix-multipart/src/server.rs index 6726bc9d3..5dc4d6f69 100644 --- a/actix-multipart/src/server.rs +++ b/actix-multipart/src/server.rs @@ -2,9 +2,7 @@ use std::{ cell::{Cell, RefCell, RefMut}, - cmp, - convert::TryFrom, - fmt, + cmp, fmt, marker::PhantomData, pin::Pin, rc::Rc, diff --git a/actix-router/CHANGES.md b/actix-router/CHANGES.md index 7ef9497dc..1f5552193 100644 --- a/actix-router/CHANGES.md +++ b/actix-router/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 0.5.1 - 2022-09-19 - Correct typo in error string for `i32` deserialization. [#2876] diff --git a/actix-router/Cargo.toml b/actix-router/Cargo.toml index f8efd5350..adf43a086 100644 --- a/actix-router/Cargo.toml +++ b/actix-router/Cargo.toml @@ -10,7 +10,7 @@ description = "Resource path matching and router" keywords = ["actix", "router", "routing"] repository = "https://github.com/actix/actix-web.git" license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [lib] name = "actix_router" @@ -27,7 +27,7 @@ serde = "1" tracing = { version = "0.1.30", default-features = false, features = ["log"] } [dev-dependencies] -criterion = { version = "0.4", features = ["html_reports"] } +criterion = { version = "0.5", features = ["html_reports"] } http = "0.2.7" serde = { version = "1", features = ["derive"] } percent-encoding = "2.1" diff --git a/actix-router/src/resource.rs b/actix-router/src/resource.rs index f198115ad..c868a3e6f 100644 --- a/actix-router/src/resource.rs +++ b/actix-router/src/resource.rs @@ -1389,8 +1389,6 @@ mod tests { #[cfg(feature = "http")] #[test] fn parse_urlencoded_param() { - use std::convert::TryFrom; - let re = ResourceDef::new("/user/{id}/test"); let mut path = Path::new("/user/2345/test"); diff --git a/actix-router/src/url.rs b/actix-router/src/url.rs index 8ac033861..8ae9ea9d8 100644 --- a/actix-router/src/url.rs +++ b/actix-router/src/url.rs @@ -65,7 +65,6 @@ impl ResourcePath for Url { #[cfg(test)] mod tests { use http::Uri; - use std::convert::TryFrom; use super::*; use crate::{Path, ResourceDef}; diff --git a/actix-test/CHANGES.md b/actix-test/CHANGES.md index 47fea4173..e3a66c663 100644 --- a/actix-test/CHANGES.md +++ b/actix-test/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 0.1.1 - 2023-02-26 - Add `TestServerConfig::port()` setter method. diff --git a/actix-test/Cargo.toml b/actix-test/Cargo.toml index f2cbfe5cd..9cf5aa76c 100644 --- a/actix-test/Cargo.toml +++ b/actix-test/Cargo.toml @@ -16,7 +16,7 @@ categories = [ "web-programming::websocket", ] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [features] default = [] @@ -43,6 +43,6 @@ log = "0.4" serde = { version = "1", features = ["derive"] } serde_json = "1" serde_urlencoded = "0.7" -tls-openssl = { package = "openssl", version = "0.10.9", optional = true } -tls-rustls = { package = "rustls", version = "0.20.0", optional = true } +tls-openssl = { package = "openssl", version = "0.10.55", optional = true } +tls-rustls = { package = "rustls", version = "0.20", optional = true } tokio = { version = "1.24.2", features = ["sync"] } diff --git a/actix-web-actors/CHANGES.md b/actix-web-actors/CHANGES.md index ea19411b5..4799c7b67 100644 --- a/actix-web-actors/CHANGES.md +++ b/actix-web-actors/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 4.2.0 - 2023-01-21 - Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency. diff --git a/actix-web-actors/Cargo.toml b/actix-web-actors/Cargo.toml index e89baed96..c6f14554a 100644 --- a/actix-web-actors/Cargo.toml +++ b/actix-web-actors/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["actix", "http", "web", "framework", "async"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-web" license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [lib] name = "actix_web_actors" @@ -32,7 +32,6 @@ actix-test = "0.1" awc = { version = "3", default-features = false } actix-web = { version = "4", features = ["macros"] } +env_logger = "0.10" +futures-util = { version = "0.3.17", default-features = false, features = ["std"] } mime = "0.3" - -env_logger = "0.9" -futures-util = { version = "0.3.17", default-features = false } diff --git a/actix-web-actors/README.md b/actix-web-actors/README.md index dce91f503..fe6122115 100644 --- a/actix-web-actors/README.md +++ b/actix-web-actors/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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 - [API Documentation](https://docs.rs/actix-web-actors) -- Minimum Supported Rust Version (MSRV): 1.59 +- Minimum Supported Rust Version (MSRV): 1.65 diff --git a/actix-web-actors/src/ws.rs b/actix-web-actors/src/ws.rs index e1110eddb..731f33f86 100644 --- a/actix-web-actors/src/ws.rs +++ b/actix-web-actors/src/ws.rs @@ -58,7 +58,6 @@ use std::{ collections::VecDeque, - convert::TryFrom, future::Future, io, mem, pin::Pin, diff --git a/actix-web-codegen/CHANGES.md b/actix-web-codegen/CHANGES.md index 6e962a6ca..b9e4b0aad 100644 --- a/actix-web-codegen/CHANGES.md +++ b/actix-web-codegen/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 4.2.0 - 2023-02-26 - Add support for custom methods with the `#[route]` macro. [#2969] diff --git a/actix-web-codegen/Cargo.toml b/actix-web-codegen/Cargo.toml index 51cb0dfef..4f2fdc566 100644 --- a/actix-web-codegen/Cargo.toml +++ b/actix-web-codegen/Cargo.toml @@ -9,7 +9,7 @@ authors = [ "Rob Ede ", ] license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [lib] proc-macro = true diff --git a/actix-web-codegen/README.md b/actix-web-codegen/README.md index 8dd3e986e..531f44a5d 100644 --- a/actix-web-codegen/README.md +++ b/actix-web-codegen/README.md @@ -4,7 +4,7 @@ [![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) -![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)
[![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 - [API Documentation](https://docs.rs/actix-web-codegen) -- Minimum Supported Rust Version (MSRV): 1.59 +- Minimum Supported Rust Version (MSRV): 1.65 ## Compile Testing diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index 0772dbd94..0b8bb0f38 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -1,4 +1,4 @@ -use std::{collections::HashSet, convert::TryFrom}; +use std::collections::HashSet; use actix_router::ResourceDef; use proc_macro::TokenStream; diff --git a/actix-web-codegen/tests/trybuild.rs b/actix-web-codegen/tests/trybuild.rs index 8839dca3d..9f0aa02f4 100644 --- a/actix-web-codegen/tests/trybuild.rs +++ b/actix-web-codegen/tests/trybuild.rs @@ -1,4 +1,4 @@ -#[rustversion::stable(1.59)] // MSRV +#[rustversion::stable(1.65)] // MSRV #[test] fn compile_macros() { let t = trybuild::TestCases::new(); diff --git a/actix-web-codegen/tests/trybuild/route-custom-lowercase.stderr b/actix-web-codegen/tests/trybuild/route-custom-lowercase.stderr index 243c4dd68..88198a55d 100644 --- a/actix-web-codegen/tests/trybuild/route-custom-lowercase.stderr +++ b/actix-web-codegen/tests/trybuild/route-custom-lowercase.stderr @@ -8,10 +8,20 @@ error[E0277]: the trait bound `fn() -> impl std::future::Future --> tests/trybuild/route-custom-lowercase.rs:14:55 | 14 | let srv = actix_test::start(|| App::new().service(index)); - | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}` + | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future {index}` | | | 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::::service` --> $WORKSPACE/actix-web/src/app.rs | diff --git a/actix-web-codegen/tests/trybuild/route-duplicate-method-fail.stderr b/actix-web-codegen/tests/trybuild/route-duplicate-method-fail.stderr index 7eac84f3e..bda736348 100644 --- a/actix-web-codegen/tests/trybuild/route-duplicate-method-fail.stderr +++ b/actix-web-codegen/tests/trybuild/route-duplicate-method-fail.stderr @@ -5,15 +5,25 @@ error: HTTP method defined more than once: `GET` | ^^^^^ error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied - --> tests/trybuild/route-duplicate-method-fail.rs:12:55 - | -12 | let srv = actix_test::start(|| App::new().service(index)); - | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}` - | | - | required by a bound introduced by this call - | + --> tests/trybuild/route-duplicate-method-fail.rs:12:55 + | +12 | let srv = actix_test::start(|| App::new().service(index)); + | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future {index}` + | | + | 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::::service` - --> $WORKSPACE/actix-web/src/app.rs - | - | F: HttpServiceFactory + 'static, - | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` + --> $WORKSPACE/actix-web/src/app.rs + | + | F: HttpServiceFactory + 'static, + | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` diff --git a/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr b/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr index bc8497c10..9f2f788fb 100644 --- a/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr +++ b/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr @@ -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) error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied - --> tests/trybuild/route-missing-method-fail.rs:12:55 - | -12 | let srv = actix_test::start(|| App::new().service(index)); - | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}` - | | - | required by a bound introduced by this call - | + --> tests/trybuild/route-missing-method-fail.rs:12:55 + | +12 | let srv = actix_test::start(|| App::new().service(index)); + | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future {index}` + | | + | 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::::service` - --> $WORKSPACE/actix-web/src/app.rs - | - | F: HttpServiceFactory + 'static, - | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` + --> $WORKSPACE/actix-web/src/app.rs + | + | F: HttpServiceFactory + 'static, + | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` diff --git a/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr b/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr index 785d6f326..e845241a4 100644 --- a/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr +++ b/actix-web-codegen/tests/trybuild/routes-missing-args-fail.stderr @@ -13,15 +13,25 @@ error: Invalid input for macro | ^^^^^^ error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied - --> tests/trybuild/routes-missing-args-fail.rs:13:55 - | -13 | let srv = actix_test::start(|| App::new().service(index)); - | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}` - | | - | required by a bound introduced by this call - | + --> tests/trybuild/routes-missing-args-fail.rs:13:55 + | +13 | let srv = actix_test::start(|| App::new().service(index)); + | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future {index}` + | | + | 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::::service` - --> $WORKSPACE/actix-web/src/app.rs - | - | F: HttpServiceFactory + 'static, - | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` + --> $WORKSPACE/actix-web/src/app.rs + | + | F: HttpServiceFactory + 'static, + | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` diff --git a/actix-web-codegen/tests/trybuild/routes-missing-method-fail.stderr b/actix-web-codegen/tests/trybuild/routes-missing-method-fail.stderr index 38a6d2f9b..228dced9c 100644 --- a/actix-web-codegen/tests/trybuild/routes-missing-method-fail.stderr +++ b/actix-web-codegen/tests/trybuild/routes-missing-method-fail.stderr @@ -7,15 +7,25 @@ error: The #[routes] macro requires at least one `#[(..)]` attribute. = 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 {index}: HttpServiceFactory` is not satisfied - --> tests/trybuild/routes-missing-method-fail.rs:12:55 - | -12 | let srv = actix_test::start(|| App::new().service(index)); - | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}` - | | - | required by a bound introduced by this call - | + --> tests/trybuild/routes-missing-method-fail.rs:12:55 + | +12 | let srv = actix_test::start(|| App::new().service(index)); + | ------- ^^^^^ the trait `HttpServiceFactory` is not implemented for fn item `fn() -> impl std::future::Future {index}` + | | + | 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::::service` - --> $WORKSPACE/actix-web/src/app.rs - | - | F: HttpServiceFactory + 'static, - | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` + --> $WORKSPACE/actix-web/src/app.rs + | + | F: HttpServiceFactory + 'static, + | ^^^^^^^^^^^^^^^^^^ required by this bound in `App::::service` diff --git a/actix-web/CHANGES.md b/actix-web/CHANGES.md index 9688370b7..417bb5a4c 100644 --- a/actix-web/CHANGES.md +++ b/actix-web/CHANGES.md @@ -10,6 +10,7 @@ ### Changed - 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 diff --git a/actix-web/Cargo.toml b/actix-web/Cargo.toml index c7314422d..0091175be 100644 --- a/actix-web/Cargo.toml +++ b/actix-web/Cargo.toml @@ -16,7 +16,7 @@ categories = [ homepage = "https://actix.rs" repository = "https://github.com/actix/actix-web.git" license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] # features that docs.rs will build with @@ -92,7 +92,7 @@ serde = "1.0" serde_json = "1.0" serde_urlencoded = "0.7" smallvec = "1.6.1" -socket2 = "0.4" +socket2 = "0.5" time = { version = "0.3", default-features = false, features = ["formatting"] } url = "2.1" @@ -102,18 +102,18 @@ actix-test = { version = "0.1", features = ["openssl", "rustls"] } awc = { version = "3", features = ["openssl"] } brotli = "3.3.3" -const-str = "0.3" -criterion = { version = "0.4", features = ["html_reports"] } -env_logger = "0.9" +const-str = "0.5" +criterion = { version = "0.5", features = ["html_reports"] } +env_logger = "0.10" flate2 = "1.0.13" futures-util = { version = "0.3.17", default-features = false, features = ["std"] } rand = "0.8" -rcgen = "0.9" +rcgen = "0.11" rustls-pemfile = "1" serde = { version = "1.0", features = ["derive"] } static_assertions = "1" -tls-openssl = { package = "openssl", version = "0.10.9" } -tls-rustls = { package = "rustls", version = "0.20.0" } +tls-openssl = { package = "openssl", version = "0.10.55" } +tls-rustls = { package = "rustls", version = "0.20" } tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] } zstd = "0.12" diff --git a/actix-web/README.md b/actix-web/README.md index 32932cc0e..cc2d9abe0 100644 --- a/actix-web/README.md +++ b/actix-web/README.md @@ -5,7 +5,7 @@

-[![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)
[![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)
[![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)

@@ -24,7 +24,7 @@ - SSL support using OpenSSL or Rustls - Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/)) - Integrates with the [`awc` HTTP client](https://docs.rs/awc/) -- Runs on stable Rust 1.59+ +- Runs on stable Rust 1.65+ ## Documentation diff --git a/actix-web/src/guard/mod.rs b/actix-web/src/guard/mod.rs index a9173a9d1..3aca11df2 100644 --- a/actix-web/src/guard/mod.rs +++ b/actix-web/src/guard/mod.rs @@ -51,7 +51,6 @@ use std::{ cell::{Ref, RefMut}, - convert::TryFrom, rc::Rc, }; diff --git a/actix-web/src/middleware/default_headers.rs b/actix-web/src/middleware/default_headers.rs index 003abd40d..b5a5a6998 100644 --- a/actix-web/src/middleware/default_headers.rs +++ b/actix-web/src/middleware/default_headers.rs @@ -1,7 +1,6 @@ //! For middleware documentation, see [`DefaultHeaders`]. use std::{ - convert::TryFrom, future::Future, marker::PhantomData, pin::Pin, diff --git a/actix-web/src/middleware/err_handlers.rs b/actix-web/src/middleware/err_handlers.rs index 5522cc021..051a0c6b3 100644 --- a/actix-web/src/middleware/err_handlers.rs +++ b/actix-web/src/middleware/err_handlers.rs @@ -270,8 +270,8 @@ impl ErrorHandlers { handlers .get(status) .map(|h| h.as_ref()) - .or_else(|| status.is_client_error().then(|| default_client).flatten()) - .or_else(|| status.is_server_error().then(|| default_server).flatten()) + .or_else(|| status.is_client_error().then_some(default_client).flatten()) + .or_else(|| status.is_server_error().then_some(default_server).flatten()) } } diff --git a/actix-web/src/middleware/logger.rs b/actix-web/src/middleware/logger.rs index 5fec5a013..0207798ae 100644 --- a/actix-web/src/middleware/logger.rs +++ b/actix-web/src/middleware/logger.rs @@ -3,7 +3,6 @@ use std::{ borrow::Cow, collections::HashSet, - convert::TryFrom, env, fmt::{self, Display as _}, future::Future, diff --git a/actix-web/src/middleware/normalize.rs b/actix-web/src/middleware/normalize.rs index 3ab908481..afcc0faac 100644 --- a/actix-web/src/middleware/normalize.rs +++ b/actix-web/src/middleware/normalize.rs @@ -15,11 +15,12 @@ use crate::{ /// /// The default is `TrailingSlash::Trim`. #[non_exhaustive] -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] pub enum TrailingSlash { /// Trim trailing slashes from the end of the path. /// /// Using this will require all routes to omit trailing slashes for them to be accessible. + #[default] Trim, /// Only merge any present multiple trailing slashes. @@ -33,12 +34,6 @@ pub enum TrailingSlash { 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. /// /// # Normalization Steps diff --git a/actix-web/src/request_data.rs b/actix-web/src/request_data.rs index 719e6551f..bffbf74da 100644 --- a/actix-web/src/request_data.rs +++ b/actix-web/src/request_data.rs @@ -27,7 +27,6 @@ use crate::{ /// # Examples /// ```no_run /// # use actix_web::{web, HttpResponse, HttpRequest, Responder, HttpMessage as _}; -/// /// #[derive(Debug, Clone, PartialEq)] /// struct FlagFromMiddleware(String); /// diff --git a/actix-web/src/response/builder.rs b/actix-web/src/response/builder.rs index 120d4c358..a7f3f36c3 100644 --- a/actix-web/src/response/builder.rs +++ b/actix-web/src/response/builder.rs @@ -1,6 +1,5 @@ use std::{ cell::{Ref, RefMut}, - convert::TryInto, future::Future, pin::Pin, task::{Context, Poll}, diff --git a/actix-web/src/rmap.rs b/actix-web/src/rmap.rs index 6e10717c3..8a2ec3297 100644 --- a/actix-web/src/rmap.rs +++ b/actix-web/src/rmap.rs @@ -136,7 +136,7 @@ impl ResourceMap { .root_rmap_fn(String::with_capacity(AVG_PATH_LEN), |mut acc, node| { node.pattern .resource_path_from_iter(&mut acc, &mut elements) - .then(|| acc) + .then_some(acc) }) .ok_or(UrlGenerationError::NotEnoughElements)?; @@ -149,7 +149,7 @@ impl ResourceMap { // external resource; third slash would be the root slash in the path let third_slash_index = path .char_indices() - .filter_map(|(i, c)| (c == '/').then(|| i)) + .filter_map(|(i, c)| (c == '/').then_some(i)) .nth(2) .unwrap_or(path.len()); diff --git a/actix-web/src/test/test_utils.rs b/actix-web/src/test/test_utils.rs index b985c3b36..bba23a0fe 100644 --- a/actix-web/src/test/test_utils.rs +++ b/actix-web/src/test/test_utils.rs @@ -359,7 +359,6 @@ where #[cfg(test)] mod tests { - use serde::{Deserialize, Serialize}; use super::*; diff --git a/awc/CHANGES.md b/awc/CHANGES.md index 03cbf61d4..f5bddd04d 100644 --- a/awc/CHANGES.md +++ b/awc/CHANGES.md @@ -2,6 +2,8 @@ ## Unreleased - 2023-xx-xx +- Minimum supported Rust version (MSRV) is now 1.65 due to transitive `time` dependency. + ## 3.1.1 - 2023-02-26 ### Changed diff --git a/awc/Cargo.toml b/awc/Cargo.toml index 8edc90fd1..9a23e4baf 100644 --- a/awc/Cargo.toml +++ b/awc/Cargo.toml @@ -13,7 +13,7 @@ categories = [ homepage = "https://actix.rs" repository = "https://github.com/actix/actix-web.git" license = "MIT OR Apache-2.0" -edition = "2018" +edition = "2021" [lib] name = "awc" @@ -83,8 +83,8 @@ tokio = { version = "1.24.2", features = ["sync"] } cookie = { version = "0.16", features = ["percent-encode"], optional = true } -tls-openssl = { package = "openssl", version = "0.10.9", optional = true } -tls-rustls = { package = "rustls", version = "0.20.0", optional = true, features = ["dangerous_configuration"] } +tls-openssl = { package = "openssl", version = "0.10.55", optional = true } +tls-rustls = { package = "rustls", version = "0.20", optional = true, features = ["dangerous_configuration"] } trust-dns-resolver = { version = "0.22", optional = true } @@ -98,12 +98,12 @@ actix-utils = "3" actix-web = { version = "4", features = ["openssl"] } brotli = "3.3.3" -const-str = "0.3" -env_logger = "0.9" +const-str = "0.5" +env_logger = "0.10" flate2 = "1.0.13" futures-util = { version = "0.3.17", default-features = false } static_assertions = "1.1" -rcgen = "0.9" +rcgen = "0.11" rustls-pemfile = "1" tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] } zstd = "0.12" diff --git a/awc/README.md b/awc/README.md index a9d411067..1a480df12 100644 --- a/awc/README.md +++ b/awc/README.md @@ -12,7 +12,7 @@ - [API Documentation](https://docs.rs/awc) - [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 diff --git a/awc/src/builder.rs b/awc/src/builder.rs index 79838a3f6..b15e2de0b 100644 --- a/awc/src/builder.rs +++ b/awc/src/builder.rs @@ -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::*; diff --git a/awc/src/client/mod.rs b/awc/src/client/mod.rs index e898d2d04..b1df1fd3d 100644 --- a/awc/src/client/mod.rs +++ b/awc/src/client/mod.rs @@ -1,6 +1,6 @@ //! 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_rt::net::TcpStream; diff --git a/awc/src/middleware/redirect.rs b/awc/src/middleware/redirect.rs index 67ef5d76f..d1216fa57 100644 --- a/awc/src/middleware/redirect.rs +++ b/awc/src/middleware/redirect.rs @@ -1,5 +1,4 @@ use std::{ - convert::TryFrom, future::Future, net::SocketAddr, pin::Pin, diff --git a/awc/src/request.rs b/awc/src/request.rs index d3a4eda8c..5e04aa8de 100644 --- a/awc/src/request.rs +++ b/awc/src/request.rs @@ -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 bytes::Bytes; diff --git a/awc/src/ws.rs b/awc/src/ws.rs index 406368e62..67fcd2429 100644 --- a/awc/src/ws.rs +++ b/awc/src/ws.rs @@ -26,7 +26,7 @@ //! } //! ``` -use std::{convert::TryFrom, fmt, net::SocketAddr, str}; +use std::{fmt, net::SocketAddr, str}; use base64::prelude::*; diff --git a/clippy.toml b/clippy.toml index abe19b3a0..04371125d 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.59" +msrv = "1.65"