mirror of
https://github.com/actix/actix-web.git
synced 2024-12-21 07:36:43 +00:00
bump msrv to 1.46 (#1858)
This commit is contained in:
parent
093d3a6c59
commit
2a2a20c3e7
16 changed files with 59 additions and 52 deletions
18
.github/workflows/linux.yml
vendored
18
.github/workflows/linux.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- 1.42.0 # MSRV
|
- 1.46.0 # MSRV
|
||||||
- stable
|
- stable
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
@ -30,6 +30,13 @@ jobs:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- name: Generate Cargo.lock
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: generate-lockfile
|
||||||
|
- name: Cache Dependencies
|
||||||
|
uses: Swatinem/rust-cache@v1.0.1
|
||||||
|
|
||||||
- name: check build
|
- name: check build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -58,12 +65,17 @@ jobs:
|
||||||
args: --package=awc --no-default-features --features=rustls -- --nocapture
|
args: --package=awc --no-default-features --features=rustls -- --nocapture
|
||||||
|
|
||||||
- name: Generate coverage file
|
- name: Generate coverage file
|
||||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
if: matrix.version == 'stable' && github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-tarpaulin --vers "^0.13"
|
cargo install cargo-tarpaulin --vers "^0.13"
|
||||||
cargo tarpaulin --out Xml
|
cargo tarpaulin --out Xml
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
if: matrix.version == 'stable' && github.ref == 'refs/heads/master'
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
file: cobertura.xml
|
file: cobertura.xml
|
||||||
|
|
||||||
|
- name: Clear the cargo caches
|
||||||
|
run: |
|
||||||
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
||||||
|
cargo-cache
|
||||||
|
|
12
.github/workflows/macos.yml
vendored
12
.github/workflows/macos.yml
vendored
|
@ -29,6 +29,13 @@ jobs:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
|
- name: Generate Cargo.lock
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: generate-lockfile
|
||||||
|
- name: Cache Dependencies
|
||||||
|
uses: Swatinem/rust-cache@v1.0.1
|
||||||
|
|
||||||
- name: check build
|
- name: check build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -42,3 +49,8 @@ jobs:
|
||||||
args: --all --all-features --no-fail-fast -- --nocapture
|
args: --all --all-features --no-fail-fast -- --nocapture
|
||||||
--skip=test_h2_content_length
|
--skip=test_h2_content_length
|
||||||
--skip=test_reading_deflate_encoding_large_random_rustls
|
--skip=test_reading_deflate_encoding_large_random_rustls
|
||||||
|
|
||||||
|
- name: Clear the cargo caches
|
||||||
|
run: |
|
||||||
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
||||||
|
cargo-cache
|
||||||
|
|
12
.github/workflows/windows.yml
vendored
12
.github/workflows/windows.yml
vendored
|
@ -41,6 +41,13 @@ jobs:
|
||||||
Get-ChildItem C:\vcpkg\installed\x64-windows\bin
|
Get-ChildItem C:\vcpkg\installed\x64-windows\bin
|
||||||
Get-ChildItem C:\vcpkg\installed\x64-windows\lib
|
Get-ChildItem C:\vcpkg\installed\x64-windows\lib
|
||||||
|
|
||||||
|
- name: Generate Cargo.lock
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: generate-lockfile
|
||||||
|
- name: Cache Dependencies
|
||||||
|
uses: Swatinem/rust-cache@v1.0.1
|
||||||
|
|
||||||
- name: check build
|
- name: check build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -62,3 +69,8 @@ jobs:
|
||||||
--skip=test_connection_force_close
|
--skip=test_connection_force_close
|
||||||
--skip=test_connection_server_close
|
--skip=test_connection_server_close
|
||||||
--skip=test_connection_wait_queue_force_close
|
--skip=test_connection_wait_queue_force_close
|
||||||
|
|
||||||
|
- name: Clear the cargo caches
|
||||||
|
run: |
|
||||||
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
||||||
|
cargo-cache
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
### Changed
|
### Changed
|
||||||
* Bumped `rand` to `0.8`
|
* Bumped `rand` to `0.8`
|
||||||
* Rename `Handler` to `HandlerService` and rename `Factory` to `Handler`. [#1852]
|
* Rename `Handler` to `HandlerService` and rename `Factory` to `Handler`. [#1852]
|
||||||
|
* MSRV is now 1.46.0.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* added the actual parsing error to `test::read_body_json` [#1812]
|
* added the actual parsing error to `test::read_body_json` [#1812]
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
[![crates.io](https://img.shields.io/crates/v/actix-web?label=latest)](https://crates.io/crates/actix-web)
|
[![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)
|
[![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)
|
![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)
|
[![Dependency Status](https://deps.rs/crate/actix-web/3.3.2/status.svg)](https://deps.rs/crate/actix-web/3.3.2)
|
||||||
<br />
|
<br />
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
* Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
|
* 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)
|
* Includes an async [HTTP client](https://actix.rs/actix-web/actix_web/client/index.html)
|
||||||
* Supports [Actix actor framework](https://github.com/actix/actix)
|
* Supports [Actix actor framework](https://github.com/actix/actix)
|
||||||
* Runs on stable Rust 1.42+
|
* Runs on stable Rust 1.46+
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|
|
@ -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.5.0)](https://docs.rs/actix-files/0.5.0)
|
[![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)
|
![License](https://img.shields.io/crates/l/actix-files.svg)
|
||||||
<br />
|
<br />
|
||||||
[![dependency status](https://deps.rs/crate/actix-files/0.5.0/status.svg)](https://deps.rs/crate/actix-files/0.5.0)
|
[![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/)
|
- [API Documentation](https://docs.rs/actix-files/)
|
||||||
- [Example Project](https://github.com/actix/examples/tree/master/static_index)
|
- [Example Project](https://github.com/actix/examples/tree/master/static_index)
|
||||||
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
- [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
|
||||||
|
|
|
@ -12,4 +12,4 @@
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-http-test)
|
- [API Documentation](https://docs.rs/actix-http-test)
|
||||||
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
- [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
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
- [API Documentation](https://docs.rs/actix-http)
|
- [API Documentation](https://docs.rs/actix-http)
|
||||||
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
- [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
|
## Example
|
||||||
|
|
||||||
|
|
|
@ -318,9 +318,8 @@ impl ContentDisposition {
|
||||||
return Err(crate::error::ParseError::Header);
|
return Err(crate::error::ParseError::Header);
|
||||||
}
|
}
|
||||||
left = new_left;
|
left = new_left;
|
||||||
if param_name.ends_with('*') {
|
if let Some(param_name) = param_name.strip_suffix('*') {
|
||||||
// extended parameters
|
// extended parameters
|
||||||
let param_name = ¶m_name[..param_name.len() - 1]; // trim asterisk
|
|
||||||
let (ext_value, new_left) = split_once_and_trim(left, ';');
|
let (ext_value, new_left) = split_once_and_trim(left, ';');
|
||||||
left = new_left;
|
left = new_left;
|
||||||
let ext_value = header::parse_extended_value(ext_value)?;
|
let ext_value = header::parse_extended_value(ext_value)?;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
clippy::new_without_default,
|
clippy::new_without_default,
|
||||||
clippy::borrow_interior_mutable_const
|
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_logo_url = "https://actix.rs/img/logo.png")]
|
||||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[![crates.io](https://meritbadge.herokuapp.com/actix-web-codegen)](https://crates.io/crates/actix-web-codegen)
|
[![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/)
|
[![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)
|
[![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)
|
[![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)
|
[![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)
|
- [API Documentation](https://docs.rs/actix-web-codegen)
|
||||||
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
||||||
- Cargo package: [actix-web-codegen](https://crates.io/crates/actix-web-codegen)
|
- 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
|
## 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.
|
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.
|
||||||
|
|
|
@ -6,31 +6,15 @@ fn compile_macros() {
|
||||||
t.compile_fail("tests/trybuild/simple-fail.rs");
|
t.compile_fail("tests/trybuild/simple-fail.rs");
|
||||||
|
|
||||||
t.pass("tests/trybuild/route-ok.rs");
|
t.pass("tests/trybuild/route-ok.rs");
|
||||||
|
|
||||||
test_route_duplicate_unexpected_method(&t);
|
|
||||||
test_route_missing_method(&t)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[rustversion::stable(1.42)]
|
|
||||||
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(nightly)]
|
|
||||||
fn test_route_missing_method(t: &trybuild::TestCases) {
|
|
||||||
t.compile_fail("tests/trybuild/route-missing-method-fail.rs");
|
t.compile_fail("tests/trybuild/route-missing-method-fail.rs");
|
||||||
}
|
|
||||||
|
|
||||||
#[rustversion::nightly]
|
|
||||||
fn test_route_missing_method(_t: &trybuild::TestCases) {}
|
|
||||||
|
|
||||||
// FIXME: Re-test them on nightly once rust-lang/rust#77993 is fixed.
|
|
||||||
#[rustversion::not(nightly)]
|
|
||||||
fn test_route_duplicate_unexpected_method(t: &trybuild::TestCases) {
|
|
||||||
t.compile_fail("tests/trybuild/route-duplicate-method-fail.rs");
|
t.compile_fail("tests/trybuild/route-duplicate-method-fail.rs");
|
||||||
t.compile_fail("tests/trybuild/route-unexpected-method-fail.rs");
|
t.compile_fail("tests/trybuild/route-unexpected-method-fail.rs");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustversion::nightly]
|
// #[rustversion::not(nightly)]
|
||||||
fn test_route_duplicate_unexpected_method(_t: &trybuild::TestCases) {}
|
// fn skip_on_nightly(t: &trybuild::TestCases) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
// #[rustversion::nightly]
|
||||||
|
// fn skip_on_nightly(_t: &trybuild::TestCases) {}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
route-missing-method-fail.rs
|
|
|
@ -1,11 +0,0 @@
|
||||||
error: The #[route(..)] macro requires at least one `method` attribute
|
|
||||||
--> $DIR/route-missing-method-fail-msrv.rs:3:1
|
|
||||||
|
|
|
||||||
3 | #[route("/")]
|
|
||||||
| ^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
error[E0425]: cannot find value `index` in this scope
|
|
||||||
--> $DIR/route-missing-method-fail-msrv.rs:12:49
|
|
||||||
|
|
|
||||||
12 | let srv = test::start(|| App::new().service(index));
|
|
||||||
| ^^^^^ not found in this scope
|
|
|
@ -13,7 +13,7 @@
|
||||||
- [API Documentation](https://docs.rs/awc)
|
- [API Documentation](https://docs.rs/awc)
|
||||||
- [Example Project](https://github.com/actix/examples/tree/HEAD/awc_https)
|
- [Example Project](https://github.com/actix/examples/tree/HEAD/awc_https)
|
||||||
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
- [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
|
## Example
|
||||||
```rust
|
```rust
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
//! * Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
|
//! * 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)
|
//! * Includes an async [HTTP client](https://actix.rs/actix-web/actix_web/client/index.html)
|
||||||
//! * Supports [Actix actor framework](https://github.com/actix/actix)
|
//! * Supports [Actix actor framework](https://github.com/actix/actix)
|
||||||
//! * Runs on stable Rust 1.42+
|
//! * Runs on stable Rust 1.46+
|
||||||
//!
|
//!
|
||||||
//! ## Crate Features
|
//! ## Crate Features
|
||||||
//!
|
//!
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
//! * `rustls` - HTTPS support via `rustls` crate, supports `HTTP/2`
|
//! * `rustls` - HTTPS support via `rustls` crate, supports `HTTP/2`
|
||||||
//! * `secure-cookies` - secure cookies support
|
//! * `secure-cookies` - secure cookies support
|
||||||
|
|
||||||
#![deny(rust_2018_idioms)]
|
#![deny(rust_2018_idioms, nonstandard_style)]
|
||||||
#![allow(clippy::needless_doctest_main, clippy::type_complexity)]
|
#![allow(clippy::needless_doctest_main, clippy::type_complexity)]
|
||||||
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
||||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||||
|
|
Loading…
Reference in a new issue