Skip to content

Commit

Permalink
update msrv to 1.56 (#2777)
Browse files Browse the repository at this point in the history
* update msrv to 1.56

* remove transitive dashmap dependency

closes #2747
  • Loading branch information
robjtede committed Jun 11, 2022
1 parent 8e76a1c commit 2253eae
Show file tree
Hide file tree
Showing 25 changed files with 39 additions and 264 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions actix-files/CHANGES.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion actix-files/README.md
Expand Up @@ -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)
<br />
[![dependency status](https://deps.rs/crate/actix-files/0.6.0/status.svg)](https://deps.rs/crate/actix-files/0.6.0)
Expand Down
1 change: 1 addition & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion actix-http-test/README.md
Expand Up @@ -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)
<br>
[![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)
Expand Down
2 changes: 2 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion actix-http/README.md
Expand Up @@ -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)
<br />
[![dependency status](https://deps.rs/crate/actix-http/3.0.4/status.svg)](https://deps.rs/crate/actix-http/3.0.4)
Expand Down
1 change: 1 addition & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion actix-multipart/README.md
Expand Up @@ -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)
<br />
[![dependency status](https://deps.rs/crate/actix-multipart/0.4.0/status.svg)](https://deps.rs/crate/actix-multipart/0.4.0)
Expand Down
1 change: 1 addition & 0 deletions 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
Expand Down
2 changes: 0 additions & 2 deletions actix-router/Cargo.toml
Expand Up @@ -21,15 +21,13 @@ default = ["http"]

[dependencies]
bytestring = ">=0.1.5, <2"
firestorm = "0.5"
http = { version = "0.2.3", optional = true }
regex = "1.5"
serde = "1"
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"
Expand Down
169 changes: 0 additions & 169 deletions actix-router/examples/flamegraph.rs

This file was deleted.

19 changes: 0 additions & 19 deletions 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};
Expand Down Expand Up @@ -52,7 +51,6 @@ impl<T: ResourcePath> Path<T> {
/// Returns full path as a string.
#[inline]
pub fn as_str(&self) -> &str {
profile_method!(as_str);
self.path.path()
}

Expand All @@ -61,7 +59,6 @@ impl<T: ResourcePath> Path<T> {
/// 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..]
Expand All @@ -72,8 +69,6 @@ impl<T: ResourcePath> Path<T> {
#[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() {
Expand All @@ -86,8 +81,6 @@ impl<T: ResourcePath> Path<T> {
/// Set new path.
#[inline]
pub fn set(&mut self, path: T) {
profile_method!(set);

self.skip = 0;
self.path = path;
self.segments.clear();
Expand All @@ -96,22 +89,17 @@ impl<T: ResourcePath> Path<T> {
/// Reset state.
#[inline]
pub fn reset(&mut self) {
profile_method!(reset);

self.skip = 0;
self.segments.clear();
}

/// 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<Cow<'static, str>>, 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((
Expand All @@ -127,8 +115,6 @@ impl<T: ResourcePath> Path<T> {
name: impl Into<Cow<'static, str>>,
value: impl Into<Cow<'static, str>>,
) {
profile_method!(add_static);

self.segments
.push((name.into(), PathItem::Static(value.into())));
}
Expand All @@ -147,8 +133,6 @@ impl<T: ResourcePath> Path<T> {

/// 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 {
Expand All @@ -167,8 +151,6 @@ impl<T: ResourcePath> Path<T> {
///
/// 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 {
Expand All @@ -186,7 +168,6 @@ impl<T: ResourcePath> Path<T> {

/// Try to deserialize matching parameters to a specified type `U`
pub fn load<'de, U: serde::Deserialize<'de>>(&'de self) -> Result<U, de::value::Error> {
profile_method!(load);
de::Deserialize::deserialize(PathDeserializer::new(self))
}
}
Expand Down

0 comments on commit 2253eae

Please sign in to comment.