mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 09:42:57 +01:00
bump MSRV to 1.42 (#1616)
This commit is contained in:
parent
f8d5ad6b53
commit
0ec335a39c
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,6 +1,8 @@
|
|||||||
## PR Type
|
<!-- Thanks for considering contributing actix! -->
|
||||||
What kind of change does this PR make?
|
<!-- Please fill out the following to make our reviews easy. -->
|
||||||
|
|
||||||
|
## PR Type
|
||||||
|
<!-- What kind of change does this PR make? -->
|
||||||
<!-- Bug Fix / Feature / Refactor / Code Style / Other -->
|
<!-- Bug Fix / Feature / Refactor / Code Style / Other -->
|
||||||
INSERT_PR_TYPE
|
INSERT_PR_TYPE
|
||||||
|
|
||||||
|
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- 1.41.1 # MSRV
|
- 1.42.0 # MSRV
|
||||||
- stable
|
- stable
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
using `App::data`. [#1610]
|
using `App::data`. [#1610]
|
||||||
* `web::Path` now has a public representation: `web::Path(pub T)` that enables
|
* `web::Path` now has a public representation: `web::Path(pub T)` that enables
|
||||||
destructuring. [#1594]
|
destructuring. [#1594]
|
||||||
|
* MSRV is now 1.42.0.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* Memory leak of app data in pooled requests. [#1609]
|
* Memory leak of app data in pooled requests. [#1609]
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[![crates.io](https://meritbadge.herokuapp.com/actix-web)](https://crates.io/crates/actix-web)
|
[![crates.io](https://meritbadge.herokuapp.com/actix-web)](https://crates.io/crates/actix-web)
|
||||||
[![Documentation](https://docs.rs/actix-web/badge.svg)](https://docs.rs/actix-web)
|
[![Documentation](https://docs.rs/actix-web/badge.svg)](https://docs.rs/actix-web)
|
||||||
[![Version](https://img.shields.io/badge/rustc-1.41+-lightgray.svg)](https://blog.rust-lang.org/2020/02/27/Rust-1.41.1.html)
|
[![Version](https://img.shields.io/badge/rustc-1.42+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.42.html)
|
||||||
![License](https://img.shields.io/crates/l/actix-web.svg)
|
![License](https://img.shields.io/crates/l/actix-web.svg)
|
||||||
<br />
|
<br />
|
||||||
[![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)
|
||||||
@ -32,7 +32,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.41+
|
* Runs on stable Rust 1.42+
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
@ -192,14 +192,8 @@ impl MessageBody for Body {
|
|||||||
impl PartialEq for Body {
|
impl PartialEq for Body {
|
||||||
fn eq(&self, other: &Body) -> bool {
|
fn eq(&self, other: &Body) -> bool {
|
||||||
match *self {
|
match *self {
|
||||||
Body::None => match *other {
|
Body::None => matches!(*other, Body::None),
|
||||||
Body::None => true,
|
Body::Empty => matches!(*other, Body::Empty),
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
Body::Empty => match *other {
|
|
||||||
Body::Empty => true,
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
Body::Bytes(ref b) => match *other {
|
Body::Bytes(ref b) => match *other {
|
||||||
Body::Bytes(ref b2) => b == b2,
|
Body::Bytes(ref b2) => b == b2,
|
||||||
_ => false,
|
_ => false,
|
||||||
|
@ -37,10 +37,7 @@ where
|
|||||||
trace!("Sending client request: {:?} {:?}", head, body.size());
|
trace!("Sending client request: {:?} {:?}", head, body.size());
|
||||||
let head_req = head.as_ref().method == Method::HEAD;
|
let head_req = head.as_ref().method == Method::HEAD;
|
||||||
let length = body.size();
|
let length = body.size();
|
||||||
let eof = match length {
|
let eof = matches!(length, BodySize::None | BodySize::Empty | BodySize::Sized(0));
|
||||||
BodySize::None | BodySize::Empty | BodySize::Sized(0) => true,
|
|
||||||
_ => false,
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut req = Request::new(());
|
let mut req = Request::new(());
|
||||||
*req.uri_mut() = head.as_ref().uri.clone();
|
*req.uri_mut() = head.as_ref().uri.clone();
|
||||||
|
@ -655,10 +655,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn is_unhandled(&self) -> bool {
|
fn is_unhandled(&self) -> bool {
|
||||||
match self {
|
matches!(self, PayloadType::Stream(_))
|
||||||
PayloadType::Stream(_) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -670,10 +667,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn eof(&self) -> bool {
|
fn eof(&self) -> bool {
|
||||||
match *self {
|
matches!(*self, PayloadItem::Eof)
|
||||||
PayloadItem::Eof => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,14 +156,8 @@ enum PollResponse {
|
|||||||
impl PartialEq for PollResponse {
|
impl PartialEq for PollResponse {
|
||||||
fn eq(&self, other: &PollResponse) -> bool {
|
fn eq(&self, other: &PollResponse) -> bool {
|
||||||
match self {
|
match self {
|
||||||
PollResponse::DrainWriteBuf => match other {
|
PollResponse::DrainWriteBuf => matches!(other, PollResponse::DrainWriteBuf),
|
||||||
PollResponse::DrainWriteBuf => true,
|
PollResponse::DoNothing => matches!(other, PollResponse::DoNothing),
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
PollResponse::DoNothing => match other {
|
|
||||||
PollResponse::DoNothing => true,
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,26 +387,17 @@ impl ContentDisposition {
|
|||||||
|
|
||||||
/// Returns `true` if it is [`Inline`](DispositionType::Inline).
|
/// Returns `true` if it is [`Inline`](DispositionType::Inline).
|
||||||
pub fn is_inline(&self) -> bool {
|
pub fn is_inline(&self) -> bool {
|
||||||
match self.disposition {
|
matches!(self.disposition, DispositionType::Inline)
|
||||||
DispositionType::Inline => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if it is [`Attachment`](DispositionType::Attachment).
|
/// Returns `true` if it is [`Attachment`](DispositionType::Attachment).
|
||||||
pub fn is_attachment(&self) -> bool {
|
pub fn is_attachment(&self) -> bool {
|
||||||
match self.disposition {
|
matches!(self.disposition, DispositionType::Attachment)
|
||||||
DispositionType::Attachment => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if it is [`FormData`](DispositionType::FormData).
|
/// Returns `true` if it is [`FormData`](DispositionType::FormData).
|
||||||
pub fn is_form_data(&self) -> bool {
|
pub fn is_form_data(&self) -> bool {
|
||||||
match self.disposition {
|
matches!(self.disposition, DispositionType::FormData)
|
||||||
DispositionType::FormData => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns `true` if it is [`Ext`](DispositionType::Ext) and the `disp_type` matches.
|
/// Returns `true` if it is [`Ext`](DispositionType::Ext) and the `disp_type` matches.
|
||||||
|
@ -148,10 +148,7 @@ impl ContentEncoding {
|
|||||||
#[inline]
|
#[inline]
|
||||||
/// Is the content compressed?
|
/// Is the content compressed?
|
||||||
pub fn is_compression(self) -> bool {
|
pub fn is_compression(self) -> bool {
|
||||||
match self {
|
matches!(self, ContentEncoding::Identity | ContentEncoding::Auto)
|
||||||
ContentEncoding::Identity | ContentEncoding::Auto => false,
|
|
||||||
_ => true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -229,10 +229,7 @@ mod tests {
|
|||||||
fn is_none(
|
fn is_none(
|
||||||
frm: &Result<Option<(bool, OpCode, Option<BytesMut>)>, ProtocolError>,
|
frm: &Result<Option<(bool, OpCode, Option<BytesMut>)>, ProtocolError>,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
match *frm {
|
matches!(*frm, Ok(None))
|
||||||
Ok(None) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extract(
|
fn extract(
|
||||||
|
@ -402,14 +402,9 @@ mod tests {
|
|||||||
|
|
||||||
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
|
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
|
||||||
match err {
|
match err {
|
||||||
JsonPayloadError::Payload(PayloadError::Overflow) => match other {
|
JsonPayloadError::Payload(PayloadError::Overflow) =>
|
||||||
JsonPayloadError::Payload(PayloadError::Overflow) => true,
|
matches!(other, JsonPayloadError::Payload(PayloadError::Overflow)),
|
||||||
_ => false,
|
JsonPayloadError::ContentType => matches!(other, JsonPayloadError::ContentType),
|
||||||
},
|
|
||||||
JsonPayloadError::ContentType => match other {
|
|
||||||
JsonPayloadError::ContentType => true,
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
1.41.1
|
1.42.0
|
||||||
|
@ -407,18 +407,9 @@ mod tests {
|
|||||||
|
|
||||||
fn eq(err: UrlencodedError, other: UrlencodedError) -> bool {
|
fn eq(err: UrlencodedError, other: UrlencodedError) -> bool {
|
||||||
match err {
|
match err {
|
||||||
UrlencodedError::Overflow { .. } => match other {
|
UrlencodedError::Overflow { .. } => matches!(other, UrlencodedError::Overflow { .. }),
|
||||||
UrlencodedError::Overflow { .. } => true,
|
UrlencodedError::UnknownLength => matches!(other, UrlencodedError::UnknownLength),
|
||||||
_ => false,
|
UrlencodedError::ContentType => matches!(other, UrlencodedError::ContentType),
|
||||||
},
|
|
||||||
UrlencodedError::UnknownLength => match other {
|
|
||||||
UrlencodedError::UnknownLength => true,
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
UrlencodedError::ContentType => match other {
|
|
||||||
UrlencodedError::ContentType => true,
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,14 +433,8 @@ mod tests {
|
|||||||
|
|
||||||
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
|
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
|
||||||
match err {
|
match err {
|
||||||
JsonPayloadError::Overflow => match other {
|
JsonPayloadError::Overflow => matches!(other, JsonPayloadError::Overflow),
|
||||||
JsonPayloadError::Overflow => true,
|
JsonPayloadError::ContentType => matches!(other, JsonPayloadError::ContentType),
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
JsonPayloadError::ContentType => match other {
|
|
||||||
JsonPayloadError::ContentType => true,
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user