1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

update MSRV to 1.65 (#3059)

This commit is contained in:
Rob Ede
2023-07-02 01:09:15 +01:00
committed by GitHub
parent 1072d0dacf
commit 241da6e081
74 changed files with 202 additions and 166 deletions

View File

@ -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

View File

@ -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]]

View File

@ -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)
<br />
[![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

View File

@ -104,7 +104,6 @@ impl MessageBody for BoxBody {
#[cfg(test)]
mod tests {
use static_assertions::{assert_impl_all, assert_not_impl_any};
use super::*;

View File

@ -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};

View File

@ -160,7 +160,6 @@ mod openssl {
#[cfg(feature = "rustls")]
mod rustls {
use std::io;
use actix_service::ServiceFactoryExt as _;

View File

@ -1,7 +1,5 @@
//! [`TryIntoHeaderPair`] trait and implementations.
use std::convert::TryFrom as _;
use super::{
Header, HeaderName, HeaderValue, InvalidHeaderName, InvalidHeaderValue, TryIntoHeaderValue,
};

View File

@ -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;

View File

@ -1,4 +1,4 @@
use std::{convert::TryFrom, str::FromStr};
use std::str::FromStr;
use derive_more::{Display, Error};
use http::header::InvalidHeaderValue;

View File

@ -1,7 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt,
};
use std::fmt;
use derive_more::{Display, Error};

View File

@ -1,4 +1,4 @@
use std::{cmp, convert::TryFrom as _, fmt, str};
use std::{cmp, fmt, str};
use crate::error::ParseError;

View File

@ -234,7 +234,6 @@ impl<P> fmt::Debug for Request<P> {
#[cfg(test)]
mod tests {
use super::*;
use std::convert::TryFrom;
#[test]
fn test_basics() {

View File

@ -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.

View File

@ -1,5 +1,4 @@
use std::cmp::min;
use std::convert::TryFrom;
use bytes::{Buf, BufMut, BytesMut};
use tracing::debug;

View File

@ -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,