diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7bb911f79..95dc6ba99 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ jobs:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- { name: Windows, os: windows-2022, triple: x86_64-pc-windows-msvc }
version:
- - 1.54.0 # MSRV
+ - 1.56.0 # MSRV
- stable
name: ${{ matrix.target.name }} / ${{ matrix.version }}
diff --git a/actix-files/CHANGES.md b/actix-files/CHANGES.md
index 7e99c2ae1..7a21e0aba 100644
--- a/actix-files/CHANGES.md
+++ b/actix-files/CHANGES.md
@@ -4,6 +4,7 @@
- Add `NamedFile::{modified, metadata, content_type, content_disposition, encoding}()` getters. [#2021]
- Update `tokio-uring` dependency to `0.3`.
- Audio files now use `Content-Disposition: inline` instead of `attachment`. [#2645]
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
[#2021]: https://github.com/actix/actix-web/pull/2021
[#2645]: https://github.com/actix/actix-web/pull/2645
diff --git a/actix-files/README.md b/actix-files/README.md
index 3c4d4443c..5035cad9e 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.6.0)](https://docs.rs/actix-files/0.6.0)
-[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
+![Version](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![License](https://img.shields.io/crates/l/actix-files.svg)
[![dependency status](https://deps.rs/crate/actix-files/0.6.0/status.svg)](https://deps.rs/crate/actix-files/0.6.0)
diff --git a/actix-http-test/CHANGES.md b/actix-http-test/CHANGES.md
index 3b98e0972..3f0be5356 100644
--- a/actix-http-test/CHANGES.md
+++ b/actix-http-test/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 3.0.0-beta.13 - 2022-02-16
diff --git a/actix-http-test/README.md b/actix-http-test/README.md
index d11ae69b2..8b8cacc2e 100644
--- a/actix-http-test/README.md
+++ b/actix-http-test/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-http-test?label=latest)](https://crates.io/crates/actix-http-test)
[![Documentation](https://docs.rs/actix-http-test/badge.svg?version=3.0.0-beta.13)](https://docs.rs/actix-http-test/3.0.0-beta.13)
-[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
+![Version](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http-test)
[![Dependency Status](https://deps.rs/crate/actix-http-test/3.0.0-beta.13/status.svg)](https://deps.rs/crate/actix-http-test/3.0.0-beta.13)
diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md
index 71132c6b2..75c131512 100644
--- a/actix-http/CHANGES.md
+++ b/actix-http/CHANGES.md
@@ -1,6 +1,8 @@
# Changes
## Unreleased - 2021-xx-xx
+### Changed
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 3.0.4 - 2022-03-09
diff --git a/actix-http/README.md b/actix-http/README.md
index 14a7013db..136582352 100644
--- a/actix-http/README.md
+++ b/actix-http/README.md
@@ -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.0.4)](https://docs.rs/actix-http/3.0.4)
-[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
+![Version](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http.svg)
[![dependency status](https://deps.rs/crate/actix-http/3.0.4/status.svg)](https://deps.rs/crate/actix-http/3.0.4)
diff --git a/actix-multipart/CHANGES.md b/actix-multipart/CHANGES.md
index 11ec8a64f..53fbf9393 100644
--- a/actix-multipart/CHANGES.md
+++ b/actix-multipart/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 0.4.0 - 2022-02-25
diff --git a/actix-multipart/README.md b/actix-multipart/README.md
index 59b9651f1..0b375bf8d 100644
--- a/actix-multipart/README.md
+++ b/actix-multipart/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-multipart?label=latest)](https://crates.io/crates/actix-multipart)
[![Documentation](https://docs.rs/actix-multipart/badge.svg?version=0.4.0)](https://docs.rs/actix-multipart/0.4.0)
-[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
+![Version](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart.svg)
[![dependency status](https://deps.rs/crate/actix-multipart/0.4.0/status.svg)](https://deps.rs/crate/actix-multipart/0.4.0)
diff --git a/actix-router/CHANGES.md b/actix-router/CHANGES.md
index 8e0e4f41e..39ff98c39 100644
--- a/actix-router/CHANGES.md
+++ b/actix-router/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 0.5.0 - 2022-02-22
diff --git a/actix-router/Cargo.toml b/actix-router/Cargo.toml
index 76f39f631..ceb5b14dc 100644
--- a/actix-router/Cargo.toml
+++ b/actix-router/Cargo.toml
@@ -21,7 +21,6 @@ default = ["http"]
[dependencies]
bytestring = ">=0.1.5, <2"
-firestorm = "0.5"
http = { version = "0.2.3", optional = true }
regex = "1.5"
serde = "1"
@@ -29,7 +28,6 @@ tracing = { version = "0.1.30", default-features = false, features = ["log"] }
[dev-dependencies]
criterion = { version = "0.3", features = ["html_reports"] }
-firestorm = { version = "0.5", features = ["enable_system_time"] }
http = "0.2.5"
serde = { version = "1", features = ["derive"] }
percent-encoding = "2.1"
diff --git a/actix-router/examples/flamegraph.rs b/actix-router/examples/flamegraph.rs
deleted file mode 100644
index 798cc22d9..000000000
--- a/actix-router/examples/flamegraph.rs
+++ /dev/null
@@ -1,169 +0,0 @@
-macro_rules! register {
- (brackets) => {{
- register!(finish => "{p1}", "{p2}", "{p3}", "{p4}")
- }};
- (finish => $p1:literal, $p2:literal, $p3:literal, $p4:literal) => {{
- let arr = [
- concat!("/authorizations"),
- concat!("/authorizations/", $p1),
- concat!("/applications/", $p1, "/tokens/", $p2),
- concat!("/events"),
- concat!("/repos/", $p1, "/", $p2, "/events"),
- concat!("/networks/", $p1, "/", $p2, "/events"),
- concat!("/orgs/", $p1, "/events"),
- concat!("/users/", $p1, "/received_events"),
- concat!("/users/", $p1, "/received_events/public"),
- concat!("/users/", $p1, "/events"),
- concat!("/users/", $p1, "/events/public"),
- concat!("/users/", $p1, "/events/orgs/", $p2),
- concat!("/feeds"),
- concat!("/notifications"),
- concat!("/repos/", $p1, "/", $p2, "/notifications"),
- concat!("/notifications/threads/", $p1),
- concat!("/notifications/threads/", $p1, "/subscription"),
- concat!("/repos/", $p1, "/", $p2, "/stargazers"),
- concat!("/users/", $p1, "/starred"),
- concat!("/user/starred"),
- concat!("/user/starred/", $p1, "/", $p2),
- concat!("/repos/", $p1, "/", $p2, "/subscribers"),
- concat!("/users/", $p1, "/subscriptions"),
- concat!("/user/subscriptions"),
- concat!("/repos/", $p1, "/", $p2, "/subscription"),
- concat!("/user/subscriptions/", $p1, "/", $p2),
- concat!("/users/", $p1, "/gists"),
- concat!("/gists"),
- concat!("/gists/", $p1),
- concat!("/gists/", $p1, "/star"),
- concat!("/repos/", $p1, "/", $p2, "/git/blobs/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/git/commits/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/git/refs"),
- concat!("/repos/", $p1, "/", $p2, "/git/tags/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/git/trees/", $p3),
- concat!("/issues"),
- concat!("/user/issues"),
- concat!("/orgs/", $p1, "/issues"),
- concat!("/repos/", $p1, "/", $p2, "/issues"),
- concat!("/repos/", $p1, "/", $p2, "/issues/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/assignees"),
- concat!("/repos/", $p1, "/", $p2, "/assignees/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/issues/", $p3, "/comments"),
- concat!("/repos/", $p1, "/", $p2, "/issues/", $p3, "/events"),
- concat!("/repos/", $p1, "/", $p2, "/labels"),
- concat!("/repos/", $p1, "/", $p2, "/labels/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/issues/", $p3, "/labels"),
- concat!("/repos/", $p1, "/", $p2, "/milestones/", $p3, "/labels"),
- concat!("/repos/", $p1, "/", $p2, "/milestones/"),
- concat!("/repos/", $p1, "/", $p2, "/milestones/", $p3),
- concat!("/emojis"),
- concat!("/gitignore/templates"),
- concat!("/gitignore/templates/", $p1),
- concat!("/meta"),
- concat!("/rate_limit"),
- concat!("/users/", $p1, "/orgs"),
- concat!("/user/orgs"),
- concat!("/orgs/", $p1),
- concat!("/orgs/", $p1, "/members"),
- concat!("/orgs/", $p1, "/members", $p2),
- concat!("/orgs/", $p1, "/public_members"),
- concat!("/orgs/", $p1, "/public_members/", $p2),
- concat!("/orgs/", $p1, "/teams"),
- concat!("/teams/", $p1),
- concat!("/teams/", $p1, "/members"),
- concat!("/teams/", $p1, "/members", $p2),
- concat!("/teams/", $p1, "/repos"),
- concat!("/teams/", $p1, "/repos/", $p2, "/", $p3),
- concat!("/user/teams"),
- concat!("/repos/", $p1, "/", $p2, "/pulls"),
- concat!("/repos/", $p1, "/", $p2, "/pulls/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/pulls/", $p3, "/commits"),
- concat!("/repos/", $p1, "/", $p2, "/pulls/", $p3, "/files"),
- concat!("/repos/", $p1, "/", $p2, "/pulls/", $p3, "/merge"),
- concat!("/repos/", $p1, "/", $p2, "/pulls/", $p3, "/comments"),
- concat!("/user/repos"),
- concat!("/users/", $p1, "/repos"),
- concat!("/orgs/", $p1, "/repos"),
- concat!("/repositories"),
- concat!("/repos/", $p1, "/", $p2),
- concat!("/repos/", $p1, "/", $p2, "/contributors"),
- concat!("/repos/", $p1, "/", $p2, "/languages"),
- concat!("/repos/", $p1, "/", $p2, "/teams"),
- concat!("/repos/", $p1, "/", $p2, "/tags"),
- concat!("/repos/", $p1, "/", $p2, "/branches"),
- concat!("/repos/", $p1, "/", $p2, "/branches/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/collaborators"),
- concat!("/repos/", $p1, "/", $p2, "/collaborators/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/comments"),
- concat!("/repos/", $p1, "/", $p2, "/commits/", $p3, "/comments"),
- concat!("/repos/", $p1, "/", $p2, "/commits"),
- concat!("/repos/", $p1, "/", $p2, "/commits/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/readme"),
- concat!("/repos/", $p1, "/", $p2, "/keys"),
- concat!("/repos/", $p1, "/", $p2, "/keys", $p3),
- concat!("/repos/", $p1, "/", $p2, "/downloads"),
- concat!("/repos/", $p1, "/", $p2, "/downloads", $p3),
- concat!("/repos/", $p1, "/", $p2, "/forks"),
- concat!("/repos/", $p1, "/", $p2, "/hooks"),
- concat!("/repos/", $p1, "/", $p2, "/hooks", $p3),
- concat!("/repos/", $p1, "/", $p2, "/releases"),
- concat!("/repos/", $p1, "/", $p2, "/releases/", $p3),
- concat!("/repos/", $p1, "/", $p2, "/releases/", $p3, "/assets"),
- concat!("/repos/", $p1, "/", $p2, "/stats/contributors"),
- concat!("/repos/", $p1, "/", $p2, "/stats/commit_activity"),
- concat!("/repos/", $p1, "/", $p2, "/stats/code_frequency"),
- concat!("/repos/", $p1, "/", $p2, "/stats/participation"),
- concat!("/repos/", $p1, "/", $p2, "/stats/punch_card"),
- concat!("/repos/", $p1, "/", $p2, "/statuses/", $p3),
- concat!("/search/repositories"),
- concat!("/search/code"),
- concat!("/search/issues"),
- concat!("/search/users"),
- concat!("/legacy/issues/search/", $p1, "/", $p2, "/", $p3, "/", $p4),
- concat!("/legacy/repos/search/", $p1),
- concat!("/legacy/user/search/", $p1),
- concat!("/legacy/user/email/", $p1),
- concat!("/users/", $p1),
- concat!("/user"),
- concat!("/users"),
- concat!("/user/emails"),
- concat!("/users/", $p1, "/followers"),
- concat!("/user/followers"),
- concat!("/users/", $p1, "/following"),
- concat!("/user/following"),
- concat!("/user/following/", $p1),
- concat!("/users/", $p1, "/following", $p2),
- concat!("/users/", $p1, "/keys"),
- concat!("/user/keys"),
- concat!("/user/keys/", $p1),
- ];
-
- arr.to_vec()
- }};
-}
-
-static PATHS: [&str; 5] = [
- "/authorizations",
- "/user/repos",
- "/repos/rust-lang/rust/stargazers",
- "/orgs/rust-lang/public_members/nikomatsakis",
- "/repos/rust-lang/rust/releases/1.51.0",
-];
-
-fn main() {
- let mut router = actix_router::Router::::build();
-
- for route in register!(brackets) {
- router.path(route, true);
- }
-
- let actix = router.finish();
-
- if firestorm::enabled() {
- firestorm::bench("target", || {
- for &route in &PATHS {
- let mut path = actix_router::Path::new(route);
- actix.recognize(&mut path).unwrap();
- }
- })
- .unwrap();
- }
-}
diff --git a/actix-router/src/path.rs b/actix-router/src/path.rs
index dfb645d72..5eef1c1e7 100644
--- a/actix-router/src/path.rs
+++ b/actix-router/src/path.rs
@@ -1,7 +1,6 @@
use std::borrow::Cow;
use std::ops::{DerefMut, Index};
-use firestorm::profile_method;
use serde::de;
use crate::{de::PathDeserializer, Resource, ResourcePath};
@@ -52,7 +51,6 @@ impl Path {
/// Returns full path as a string.
#[inline]
pub fn as_str(&self) -> &str {
- profile_method!(as_str);
self.path.path()
}
@@ -61,7 +59,6 @@ impl Path {
/// Returns empty string if no more is to be processed.
#[inline]
pub fn unprocessed(&self) -> &str {
- profile_method!(unprocessed);
// clamp skip to path length
let skip = (self.skip as usize).min(self.as_str().len());
&self.path.path()[skip..]
@@ -72,8 +69,6 @@ impl Path {
#[deprecated(since = "0.6.0", note = "Use `.as_str()` or `.unprocessed()`.")]
#[inline]
pub fn path(&self) -> &str {
- profile_method!(path);
-
let skip = self.skip as usize;
let path = self.path.path();
if skip <= path.len() {
@@ -86,8 +81,6 @@ impl Path {
/// Set new path.
#[inline]
pub fn set(&mut self, path: T) {
- profile_method!(set);
-
self.skip = 0;
self.path = path;
self.segments.clear();
@@ -96,8 +89,6 @@ impl Path {
/// Reset state.
#[inline]
pub fn reset(&mut self) {
- profile_method!(reset);
-
self.skip = 0;
self.segments.clear();
}
@@ -105,13 +96,10 @@ impl Path {
/// Skip first `n` chars in path.
#[inline]
pub fn skip(&mut self, n: u16) {
- profile_method!(skip);
self.skip += n;
}
pub(crate) fn add(&mut self, name: impl Into>, value: PathItem) {
- profile_method!(add);
-
match value {
PathItem::Static(s) => self.segments.push((name.into(), PathItem::Static(s))),
PathItem::Segment(begin, end) => self.segments.push((
@@ -127,8 +115,6 @@ impl Path {
name: impl Into>,
value: impl Into>,
) {
- profile_method!(add_static);
-
self.segments
.push((name.into(), PathItem::Static(value.into())));
}
@@ -147,8 +133,6 @@ impl Path {
/// Get matched parameter by name without type conversion
pub fn get(&self, name: &str) -> Option<&str> {
- profile_method!(get);
-
for (seg_name, val) in self.segments.iter() {
if name == seg_name {
return match val {
@@ -167,8 +151,6 @@ impl Path {
///
/// If keyed parameter is not available empty string is used as default value.
pub fn query(&self, key: &str) -> &str {
- profile_method!(query);
-
if let Some(s) = self.get(key) {
s
} else {
@@ -186,7 +168,6 @@ impl Path {
/// Try to deserialize matching parameters to a specified type `U`
pub fn load<'de, U: serde::Deserialize<'de>>(&'de self) -> Result {
- profile_method!(load);
de::Deserialize::deserialize(PathDeserializer::new(self))
}
}
diff --git a/actix-router/src/resource.rs b/actix-router/src/resource.rs
index 3d121f369..bc082273c 100644
--- a/actix-router/src/resource.rs
+++ b/actix-router/src/resource.rs
@@ -5,7 +5,6 @@ use std::{
mem,
};
-use firestorm::{profile_fn, profile_method, profile_section};
use regex::{escape, Regex, RegexSet};
use tracing::error;
@@ -272,7 +271,6 @@ impl ResourceDef {
/// assert!(!resource.is_match("/foo"));
/// ```
pub fn new(paths: T) -> Self {
- profile_method!(new);
Self::construct(paths, false)
}
@@ -300,7 +298,6 @@ impl ResourceDef {
/// assert!(!resource.is_match("/foo"));
/// ```
pub fn prefix(paths: T) -> Self {
- profile_method!(prefix);
ResourceDef::construct(paths, true)
}
@@ -325,7 +322,6 @@ impl ResourceDef {
/// assert!(!resource.is_match("user/123"));
/// ```
pub fn root_prefix(path: &str) -> Self {
- profile_method!(root_prefix);
ResourceDef::prefix(insert_slash(path).into_owned())
}
@@ -549,8 +545,6 @@ impl ResourceDef {
/// ```
#[inline]
pub fn is_match(&self, path: &str) -> bool {
- profile_method!(is_match);
-
// this function could be expressed as:
// `self.find_match(path).is_some()`
// but this skips some checks and uses potentially faster regex methods
@@ -598,8 +592,6 @@ impl ResourceDef {
/// assert_eq!(resource.find_match("/profile/1234"), Some(13));
/// ```
pub fn find_match(&self, path: &str) -> Option {
- profile_method!(find_match);
-
match &self.pat_type {
PatternType::Static(pattern) => self.static_match(pattern, path),
@@ -634,7 +626,6 @@ impl ResourceDef {
/// assert_eq!(path.unprocessed(), "");
/// ```
pub fn capture_match_info(&self, resource: &mut R) -> bool {
- profile_method!(capture_match_info);
self.capture_match_info_fn(resource, |_| true)
}
@@ -680,53 +671,35 @@ impl ResourceDef {
R: Resource,
F: FnOnce(&R) -> bool,
{
- profile_method!(capture_match_info_fn);
-
let mut segments = <[PathItem; MAX_DYNAMIC_SEGMENTS]>::default();
let path = resource.resource_path();
let path_str = path.unprocessed();
let (matched_len, matched_vars) = match &self.pat_type {
- PatternType::Static(pattern) => {
- profile_section!(pattern_static_or_prefix);
-
- match self.static_match(pattern, path_str) {
- Some(len) => (len, None),
- None => return false,
- }
- }
+ PatternType::Static(pattern) => match self.static_match(pattern, path_str) {
+ Some(len) => (len, None),
+ None => return false,
+ },
PatternType::Dynamic(re, names) => {
- profile_section!(pattern_dynamic);
-
- let captures = {
- profile_section!(pattern_dynamic_regex_exec);
-
- match re.captures(path.unprocessed()) {
- Some(captures) => captures,
- _ => return false,
- }
+ let captures = match re.captures(path.unprocessed()) {
+ Some(captures) => captures,
+ _ => return false,
};
- {
- profile_section!(pattern_dynamic_extract_captures);
-
- for (no, name) in names.iter().enumerate() {
- if let Some(m) = captures.name(name) {
- segments[no] = PathItem::Segment(m.start() as u16, m.end() as u16);
- } else {
- error!("Dynamic path match but not all segments found: {}", name);
- return false;
- }
+ for (no, name) in names.iter().enumerate() {
+ if let Some(m) = captures.name(name) {
+ segments[no] = PathItem::Segment(m.start() as u16, m.end() as u16);
+ } else {
+ error!("Dynamic path match but not all segments found: {}", name);
+ return false;
}
- };
+ }
(captures[1].len(), Some(names))
}
PatternType::DynamicSet(re, params) => {
- profile_section!(pattern_dynamic_set);
-
let path = path.unprocessed();
let (pattern, names) = match re.matches(path).into_iter().next() {
Some(idx) => ¶ms[idx],
@@ -809,7 +782,6 @@ impl ResourceDef {
I: IntoIterator,
I::Item: AsRef,
{
- profile_method!(resource_path_from_iter);
let mut iter = values.into_iter();
self.build_resource_path(path, |_| iter.next())
}
@@ -845,7 +817,6 @@ impl ResourceDef {
V: AsRef,
S: BuildHasher,
{
- profile_method!(resource_path_from_map);
self.build_resource_path(path, |name| values.get(name))
}
@@ -866,8 +837,6 @@ impl ResourceDef {
}
fn construct(paths: T, is_prefix: bool) -> Self {
- profile_method!(construct);
-
let patterns = paths.patterns();
let (pat_type, segments) = match &patterns {
Patterns::Single(pattern) => ResourceDef::parse(pattern, is_prefix, false),
@@ -926,8 +895,6 @@ impl ResourceDef {
/// # Panics
/// Panics if given patterns does not contain a dynamic segment.
fn parse_param(pattern: &str) -> (PatternSegment, String, &str, bool) {
- profile_method!(parse_param);
-
const DEFAULT_PATTERN: &str = "[^/]+";
const DEFAULT_PATTERN_TAIL: &str = ".*";
@@ -997,8 +964,6 @@ impl ResourceDef {
is_prefix: bool,
force_dynamic: bool,
) -> (PatternType, Vec) {
- profile_method!(parse);
-
if !force_dynamic && pattern.find('{').is_none() && !pattern.ends_with('*') {
// pattern is static
return (
@@ -1131,8 +1096,6 @@ impl From for ResourceDef {
}
pub(crate) fn insert_slash(path: &str) -> Cow<'_, str> {
- profile_fn!(insert_slash);
-
if !path.is_empty() && !path.starts_with('/') {
let mut new_path = String::with_capacity(path.len() + 1);
new_path.push('/');
diff --git a/actix-router/src/router.rs b/actix-router/src/router.rs
index f0e598683..8ed966b59 100644
--- a/actix-router/src/router.rs
+++ b/actix-router/src/router.rs
@@ -1,5 +1,3 @@
-use firestorm::profile_method;
-
use crate::{IntoPatterns, Resource, ResourceDef};
#[derive(Debug, Copy, Clone, PartialEq)]
@@ -30,7 +28,6 @@ impl Router {
where
R: Resource,
{
- profile_method!(recognize);
self.recognize_fn(resource, |_, _| true)
}
@@ -39,7 +36,6 @@ impl Router {
where
R: Resource,
{
- profile_method!(recognize_mut);
self.recognize_mut_fn(resource, |_, _| true)
}
@@ -55,8 +51,6 @@ impl Router {
R: Resource,
F: FnMut(&R, &U) -> bool,
{
- profile_method!(recognize_checked);
-
for (rdef, val, ctx) in self.routes.iter() {
if rdef.capture_match_info_fn(resource, |res| check(res, ctx)) {
return Some((val, ResourceId(rdef.id())));
@@ -77,8 +71,6 @@ impl Router {
R: Resource,
F: FnMut(&R, &U) -> bool,
{
- profile_method!(recognize_mut_checked);
-
for (rdef, val, ctx) in self.routes.iter_mut() {
if rdef.capture_match_info_fn(resource, |res| check(res, ctx)) {
return Some((val, ResourceId(rdef.id())));
@@ -104,7 +96,6 @@ impl RouterBuilder {
val: T,
ctx: U,
) -> (&mut ResourceDef, &mut T, &mut U) {
- profile_method!(push);
self.routes.push((rdef, val, ctx));
self.routes
.last_mut()
@@ -131,7 +122,6 @@ where
path: impl IntoPatterns,
val: T,
) -> (&mut ResourceDef, &mut T, &mut U) {
- profile_method!(path);
self.push(ResourceDef::new(path), val, U::default())
}
@@ -141,13 +131,11 @@ where
prefix: impl IntoPatterns,
val: T,
) -> (&mut ResourceDef, &mut T, &mut U) {
- profile_method!(prefix);
self.push(ResourceDef::prefix(prefix), val, U::default())
}
/// Registers resource for [`ResourceDef`].
pub fn rdef(&mut self, rdef: ResourceDef, val: T) -> (&mut ResourceDef, &mut T, &mut U) {
- profile_method!(rdef);
self.push(rdef, val, U::default())
}
}
diff --git a/actix-test/CHANGES.md b/actix-test/CHANGES.md
index 13e75c01a..9b84f04b0 100644
--- a/actix-test/CHANGES.md
+++ b/actix-test/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 0.1.0-beta.13 - 2022-02-16
diff --git a/actix-web-actors/CHANGES.md b/actix-web-actors/CHANGES.md
index b4844bfa6..f143be29c 100644
--- a/actix-web-actors/CHANGES.md
+++ b/actix-web-actors/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 4.1.0 - 2022-03-02
diff --git a/actix-web-actors/README.md b/actix-web-actors/README.md
index 357154a86..39a10a4e2 100644
--- a/actix-web-actors/README.md
+++ b/actix-web-actors/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-web-actors?label=latest)](https://crates.io/crates/actix-web-actors)
[![Documentation](https://docs.rs/actix-web-actors/badge.svg?version=4.1.0)](https://docs.rs/actix-web-actors/4.1.0)
-[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
+![Version](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![License](https://img.shields.io/crates/l/actix-web-actors.svg)
[![dependency status](https://deps.rs/crate/actix-web-actors/4.1.0/status.svg)](https://deps.rs/crate/actix-web-actors/4.1.0)
diff --git a/actix-web-codegen/CHANGES.md b/actix-web-codegen/CHANGES.md
index 04bbb4de1..14b368064 100644
--- a/actix-web-codegen/CHANGES.md
+++ b/actix-web-codegen/CHANGES.md
@@ -2,6 +2,7 @@
## Unreleased - 2021-xx-xx
- Fix support for guard paths in route handler macros. [#2771]
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
[#2771] https://github.com/actix/actix-web/pull/2771
diff --git a/actix-web-codegen/README.md b/actix-web-codegen/README.md
index 439beadb4..178bb8c67 100644
--- a/actix-web-codegen/README.md
+++ b/actix-web-codegen/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-web-codegen?label=latest)](https://crates.io/crates/actix-web-codegen)
[![Documentation](https://docs.rs/actix-web-codegen/badge.svg?version=4.0.0)](https://docs.rs/actix-web-codegen/4.0.0)
-[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
+![Version](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![License](https://img.shields.io/crates/l/actix-web-codegen.svg)
[![dependency status](https://deps.rs/crate/actix-web-codegen/4.0.0/status.svg)](https://deps.rs/crate/actix-web-codegen/4.0.0)
diff --git a/actix-web-codegen/tests/trybuild.rs b/actix-web-codegen/tests/trybuild.rs
index b2d9ce186..13eb84559 100644
--- a/actix-web-codegen/tests/trybuild.rs
+++ b/actix-web-codegen/tests/trybuild.rs
@@ -1,4 +1,4 @@
-#[rustversion::stable(1.54)] // MSRV
+#[rustversion::stable(1.56)] // MSRV
#[test]
fn compile_macros() {
let t = trybuild::TestCases::new();
diff --git a/actix-web/CHANGES.md b/actix-web/CHANGES.md
index cb82ef653..86ded5729 100644
--- a/actix-web/CHANGES.md
+++ b/actix-web/CHANGES.md
@@ -7,6 +7,9 @@
- Add `ServiceConfig::default_service()`. [#2338] [#2743]
- Implement `ResponseError` for `std::convert::Infallible`
+### Changed
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
+
### Fixed
- Clear connection-level data on `HttpRequest` drop. [#2742]
diff --git a/actix-web/README.md b/actix-web/README.md
index 957fb47b8..1eaaa2049 100644
--- a/actix-web/README.md
+++ b/actix-web/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=4.0.1)](https://docs.rs/actix-web/4.0.1)
-![MSRV](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)
+![MSRV](https://img.shields.io/badge/rustc-1.56+-ab6000.svg)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
[![Dependency Status](https://deps.rs/crate/actix-web/4.0.1/status.svg)](https://deps.rs/crate/actix-web/4.0.1)
@@ -33,7 +33,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.54+
+- Runs on stable Rust 1.56+
## Documentation
diff --git a/awc/CHANGES.md b/awc/CHANGES.md
index ebc0dbe61..622388286 100644
--- a/awc/CHANGES.md
+++ b/awc/CHANGES.md
@@ -1,6 +1,8 @@
# Changes
## Unreleased - 2021-xx-xx
+### Changed
+- Minimum supported Rust version (MSRV) is now 1.56 due to transitive `hashbrown` dependency.
## 3.0.0 - 2022-03-07
diff --git a/clippy.toml b/clippy.toml
index ece14b8d2..62ca74234 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -1 +1 @@
-msrv = "1.54"
+msrv = "1.56"