mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-27 07:19:04 +02:00
update MSRV to 1.65 (#3059)
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
</p>
|
||||
<p>
|
||||
|
||||
[](https://crates.io/crates/actix-web) [](https://docs.rs/actix-web/4.3.1)   [](https://deps.rs/crate/actix-web/4.3.1) <br /> [](https://github.com/actix/actix-web/actions/workflows/ci.yml) [](https://codecov.io/gh/actix/actix-web)  [](https://discord.gg/NWpN5mmg3x)
|
||||
[](https://crates.io/crates/actix-web) [](https://docs.rs/actix-web/4.3.1)   [](https://deps.rs/crate/actix-web/4.3.1) <br /> [](https://github.com/actix/actix-web/actions/workflows/ci.yml) [](https://codecov.io/gh/actix/actix-web)  [](https://discord.gg/NWpN5mmg3x)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
@ -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
|
||||
|
||||
|
@ -51,7 +51,6 @@
|
||||
|
||||
use std::{
|
||||
cell::{Ref, RefMut},
|
||||
convert::TryFrom,
|
||||
rc::Rc,
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//! For middleware documentation, see [`DefaultHeaders`].
|
||||
|
||||
use std::{
|
||||
convert::TryFrom,
|
||||
future::Future,
|
||||
marker::PhantomData,
|
||||
pin::Pin,
|
||||
|
@ -270,8 +270,8 @@ impl<B> ErrorHandlers<B> {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
collections::HashSet,
|
||||
convert::TryFrom,
|
||||
env,
|
||||
fmt::{self, Display as _},
|
||||
future::Future,
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
///
|
||||
|
@ -1,6 +1,5 @@
|
||||
use std::{
|
||||
cell::{Ref, RefMut},
|
||||
convert::TryInto,
|
||||
future::Future,
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
|
@ -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());
|
||||
|
||||
|
@ -359,7 +359,6 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::*;
|
||||
|
Reference in New Issue
Block a user