From 9154f63fe264fde91a175fa4cd86b5c2b0b37992 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 27 Dec 2020 21:07:23 +0000 Subject: [PATCH] bump msrv to 1.46 --- .github/workflows/linux.yml | 2 +- CHANGES.md | 1 + README.md | 4 ++-- actix-files/README.md | 4 ++-- actix-http-test/README.md | 2 +- actix-http/README.md | 2 +- actix-http/src/header/common/content_disposition.rs | 3 +-- actix-http/src/lib.rs | 1 - actix-web-codegen/README.md | 4 ++-- actix-web-codegen/tests/trybuild.rs | 4 ++-- awc/README.md | 2 +- src/lib.rs | 4 ++-- 12 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a068070ff..2fc8b4d86 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: version: - - 1.42.0 # MSRV + - 1.46.0 # MSRV - stable - nightly diff --git a/CHANGES.md b/CHANGES.md index da04c5aa3..fa56acc17 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ ### Changed * Bumped `rand` to `0.8` * Rename `Handler` to `HandlerService` and rename `Factory` to `Handler`. [#1852] +* MSRV is now 1.46.0. ### Fixed * added the actual parsing error to `test::read_body_json` [#1812] diff --git a/README.md b/README.md index b9f2b7594..62ee50243 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,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=3.3.2)](https://docs.rs/actix-web/3.3.2) -[![Version](https://img.shields.io/badge/rustc-1.42+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.42.html) +[![Version](https://img.shields.io/badge/rustc-1.46+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html) ![License](https://img.shields.io/crates/l/actix-web.svg) [![Dependency Status](https://deps.rs/crate/actix-web/3.3.2/status.svg)](https://deps.rs/crate/actix-web/3.3.2)
@@ -34,7 +34,7 @@ * Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/)) * Includes an async [HTTP client](https://actix.rs/actix-web/actix_web/client/index.html) * Supports [Actix actor framework](https://github.com/actix/actix) -* Runs on stable Rust 1.42+ +* Runs on stable Rust 1.46+ ## Documentation diff --git a/actix-files/README.md b/actix-files/README.md index 2953b4458..463f20224 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.5.0)](https://docs.rs/actix-files/0.5.0) -[![Version](https://img.shields.io/badge/rustc-1.42+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.42.html) +[![Version](https://img.shields.io/badge/rustc-1.46+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html) ![License](https://img.shields.io/crates/l/actix-files.svg)
[![dependency status](https://deps.rs/crate/actix-files/0.5.0/status.svg)](https://deps.rs/crate/actix-files/0.5.0) @@ -16,4 +16,4 @@ - [API Documentation](https://docs.rs/actix-files/) - [Example Project](https://github.com/actix/examples/tree/master/static_index) - [Chat on Gitter](https://gitter.im/actix/actix-web) -- Minimum supported Rust version: 1.42 or later +- Minimum supported Rust version: 1.46 or later diff --git a/actix-http-test/README.md b/actix-http-test/README.md index c847c8515..bca9a7976 100644 --- a/actix-http-test/README.md +++ b/actix-http-test/README.md @@ -12,4 +12,4 @@ - [API Documentation](https://docs.rs/actix-http-test) - [Chat on Gitter](https://gitter.im/actix/actix-web) -- Minimum Supported Rust Version (MSRV): 1.42.0 +- Minimum Supported Rust Version (MSRV): 1.46.0 diff --git a/actix-http/README.md b/actix-http/README.md index 9103cd184..9dfb85e24 100644 --- a/actix-http/README.md +++ b/actix-http/README.md @@ -12,7 +12,7 @@ - [API Documentation](https://docs.rs/actix-http) - [Chat on Gitter](https://gitter.im/actix/actix-web) -- Minimum Supported Rust Version (MSRV): 1.42.0 +- Minimum Supported Rust Version (MSRV): 1.46.0 ## Example diff --git a/actix-http/src/header/common/content_disposition.rs b/actix-http/src/header/common/content_disposition.rs index 826cfef63..4c512acbe 100644 --- a/actix-http/src/header/common/content_disposition.rs +++ b/actix-http/src/header/common/content_disposition.rs @@ -318,9 +318,8 @@ impl ContentDisposition { return Err(crate::error::ParseError::Header); } left = new_left; - if param_name.ends_with('*') { + if let Some(param_name) = param_name.strip_suffix('*') { // extended parameters - let param_name = ¶m_name[..param_name.len() - 1]; // trim asterisk let (ext_value, new_left) = split_once_and_trim(left, ';'); left = new_left; let ext_value = header::parse_extended_value(ext_value)?; diff --git a/actix-http/src/lib.rs b/actix-http/src/lib.rs index 89d64fb77..94cc50a76 100644 --- a/actix-http/src/lib.rs +++ b/actix-http/src/lib.rs @@ -7,7 +7,6 @@ clippy::new_without_default, clippy::borrow_interior_mutable_const )] -#![allow(clippy::manual_strip)] // Allow this to keep MSRV(1.42). #![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")] diff --git a/actix-web-codegen/README.md b/actix-web-codegen/README.md index 283591e86..887502075 100644 --- a/actix-web-codegen/README.md +++ b/actix-web-codegen/README.md @@ -4,7 +4,7 @@ [![crates.io](https://meritbadge.herokuapp.com/actix-web-codegen)](https://crates.io/crates/actix-web-codegen) [![Documentation](https://docs.rs/actix-web-codegen/badge.svg)](https://docs.rs/actix-web-codegen/0.4.0/actix_web_codegen/) -[![Version](https://img.shields.io/badge/rustc-1.42+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.42.html) +[![Version](https://img.shields.io/badge/rustc-1.46+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html) [![Build Status](https://travis-ci.org/actix/actix-web.svg?branch=master)](https://travis-ci.org/actix/actix-web) [![codecov](https://codecov.io/gh/actix/actix-web/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-web) [![Join the chat at https://gitter.im/actix/actix](https://badges.gitter.im/actix/actix.svg)](https://gitter.im/actix/actix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) @@ -14,7 +14,7 @@ - [API Documentation](https://docs.rs/actix-web-codegen) - [Chat on Gitter](https://gitter.im/actix/actix-web) - Cargo package: [actix-web-codegen](https://crates.io/crates/actix-web-codegen) -- Minimum supported Rust version: 1.42 or later. +- Minimum supported Rust version: 1.46 or later. ## Compile Testing Uses the [`trybuild`] crate. All compile fail tests should include a stderr file generated by `trybuild`. See the [workflow section](https://github.com/dtolnay/trybuild#workflow) of the trybuild docs for info on how to do this. diff --git a/actix-web-codegen/tests/trybuild.rs b/actix-web-codegen/tests/trybuild.rs index 6c7c58986..98a5a46d6 100644 --- a/actix-web-codegen/tests/trybuild.rs +++ b/actix-web-codegen/tests/trybuild.rs @@ -11,12 +11,12 @@ fn compile_macros() { test_route_missing_method(&t) } -#[rustversion::stable(1.42)] +#[rustversion::stable(1.46)] fn test_route_missing_method(t: &trybuild::TestCases) { t.compile_fail("tests/trybuild/route-missing-method-fail-msrv.rs"); } -#[rustversion::not(stable(1.42))] +#[rustversion::not(stable(1.46))] #[rustversion::not(nightly)] fn test_route_missing_method(t: &trybuild::TestCases) { t.compile_fail("tests/trybuild/route-missing-method-fail.rs"); diff --git a/awc/README.md b/awc/README.md index b97d4fa00..972a80140 100644 --- a/awc/README.md +++ b/awc/README.md @@ -13,7 +13,7 @@ - [API Documentation](https://docs.rs/awc) - [Example Project](https://github.com/actix/examples/tree/HEAD/awc_https) - [Chat on Gitter](https://gitter.im/actix/actix-web) -- Minimum Supported Rust Version (MSRV): 1.42.0 +- Minimum Supported Rust Version (MSRV): 1.46.0 ## Example ```rust diff --git a/src/lib.rs b/src/lib.rs index 8246c8286..88eae44bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -56,7 +56,7 @@ //! * Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/)) //! * Includes an async [HTTP client](https://actix.rs/actix-web/actix_web/client/index.html) //! * Supports [Actix actor framework](https://github.com/actix/actix) -//! * Runs on stable Rust 1.42+ +//! * Runs on stable Rust 1.46+ //! //! ## Crate Features //! @@ -65,7 +65,7 @@ //! * `rustls` - HTTPS support via `rustls` crate, supports `HTTP/2` //! * `secure-cookies` - secure cookies support -#![deny(rust_2018_idioms)] +#![deny(rust_2018_idioms, nonstandard_style)] #![allow(clippy::needless_doctest_main, clippy::type_complexity)] #![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]