1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

MSRV 1.68 (#328)

This commit is contained in:
Rob Ede 2023-09-16 00:30:38 +01:00 committed by GitHub
parent 75386f4a1d
commit aaedb9c625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 245 additions and 235 deletions

View File

@ -1,5 +0,0 @@
blank_issues_enabled: true
contact_links:
- name: Gitter channel (actix)
url: https://gitter.im/actix/actix
about: Please ask and answer questions about the actix project here.

10
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

View File

@ -16,10 +16,8 @@ jobs:
matrix:
target:
- { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
version:
- nightly
name: ${{ matrix.target.name }} / ${{ matrix.version }}
name: ${{ matrix.target.name }} / nightly
runs-on: ${{ matrix.target.os }}
services:
@ -32,13 +30,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: ${{ matrix.version }}
toolchain: nightly
- uses: taiki-e/cache-cargo-install-action@v1
with: { tool: cargo-hack }
- uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: check minimal
run: cargo ci-min
@ -61,30 +60,26 @@ jobs:
build_and_test_other_nightly:
strategy:
fail-fast: false
# prettier-ignore
matrix:
target:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- {
name: Windows,
os: windows-latest,
triple: x86_64-pc-windows-msvc,
}
version:
- nightly
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
name: ${{ matrix.target.name }} / ${{ matrix.version }}
name: ${{ matrix.target.name }} / nightly
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: ${{ matrix.version }}
toolchain: nightly
- uses: taiki-e/cache-cargo-install-action@v1
with: { tool: cargo-hack }
- uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: check minimal
run: cargo ci-min

View File

@ -1,8 +1,12 @@
name: CI
on:
pull_request: {}
push: { branches: [master] }
pull_request:
types: [opened, synchronize, reopened]
merge_group:
types: [checks_requested]
push:
branches: [master]
permissions: { contents: read }
@ -18,10 +22,10 @@ jobs:
target:
- { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
version:
- '1.60' # MSRV
- stable
- { name: msrv, version: 1.68.0 }
- { name: stable, version: stable }
name: ${{ matrix.target.name }} / ${{ matrix.version }}
name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
runs-on: ${{ matrix.target.os }}
services:
@ -39,19 +43,20 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust (${{ matrix.version.name }})
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: ${{ matrix.version }}
toolchain: ${{ matrix.version.version }}
- name: Install cargo-hack
uses: taiki-e/cache-cargo-install-action@v1
with: { tool: cargo-hack }
uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: workaround MSRV issues
if: matrix.version != 'stable'
run: |
cargo update -p=time:0.3.20 --precise=0.3.16
# - name: workaround MSRV issues
# if: matrix.version.name == 'msrv'
# run: |
# cargo update -p=time:0.3.20 --precise=0.3.16
- name: check minimal
run: cargo ci-min
@ -75,36 +80,34 @@ jobs:
strategy:
fail-fast: false
matrix:
# prettier-ignore
target:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- {
name: Windows,
os: windows-latest,
triple: x86_64-pc-windows-msvc,
}
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
version:
- '1.60' # MSRV
- stable
- { name: msrv, version: 1.68.0 }
- { name: stable, version: stable }
name: ${{ matrix.target.name }} / ${{ matrix.version }}
name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Rust (${{ matrix.version.name }})
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: ${{ matrix.version }}
toolchain: ${{ matrix.version.version }}
- name: Install cargo-hack
uses: taiki-e/cache-cargo-install-action@v1
with: { tool: cargo-hack }
uses: taiki-e/install-action@v2.18.9
with:
tool: cargo-hack
- name: workaround MSRV issues
if: matrix.version != 'stable'
run: |
cargo update -p=time:0.3.20 --precise=0.3.16
# - name: workaround MSRV issues
# if: matrix.version.name == 'msrv'
# run: |
# cargo update -p=time:0.3.20 --precise=0.3.16
- name: check minimal
run: cargo ci-min
@ -131,8 +134,9 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
- name: doc tests
timeout-minutes: 40

View File

@ -1,7 +1,8 @@
name: Coverage
on:
push: { branches: [master] }
push:
branches: [master]
permissions: { contents: read }
@ -24,8 +25,9 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
- name: Generate coverage file
run: |
@ -34,4 +36,5 @@ jobs:
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with: { file: cobertura.xml }
with:
file: cobertura.xml

View File

@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
components: rustfmt
@ -29,11 +29,12 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { components: clippy }
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
components: clippy
- name: Check with Clippy
run: cargo clippy --workspace --tests --all-features
run: cargo clippy --workspace --tests --all-features -- -A unknown_lints
public-api-diff:
runs-on: ubuntu-latest
@ -47,12 +48,14 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
with: { toolchain: nightly }
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: nightly
- name: Install cargo-public-api
uses: taiki-e/cache-cargo-install-action@v1
with: { tool: cargo-public-api }
uses: taiki-e/cache-cargo-install-action@v1.2.1
with:
tool: cargo-public-api
- name: generate API diff
run: |

View File

@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with: { toolchain: nightly }
- name: Build Docs

View File

@ -11,10 +11,10 @@ members = [
"actix-web-httpauth",
]
# TODO(MSRV 1.64)
# [workspace.package]
# edition = "2018"
# rust-version = "1.60"
[workspace.package]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.68"
[patch.crates-io]
actix-cors = { path = "./actix-cors" }

View File

@ -1,79 +1,79 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
## 0.6.4 - 2022-10-28
## 0.6.4
- Add `Cors::allow_private_network_access()` behind an unstable flag (`draft-private-network-access`). [#297]
[#297]: https://github.com/actix/actix-extras/pull/297
## 0.6.3 - 2022-09-21
## 0.6.3
- Add `Cors::block_on_origin_mismatch()` option for controlling if requests are pre-emptively rejected. [#287]
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
[#287]: https://github.com/actix/actix-extras/pull/287
## 0.6.2 - 2022-08-07
## 0.6.2
- Fix `expose_any_header` to return list of response headers. [#273]
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
[#273]: https://github.com/actix/actix-extras/pull/273
## 0.6.1 - 2022-03-07
## 0.6.1
- Do not consider requests without a `Access-Control-Request-Method` as preflight. [#226]
[#226]: https://github.com/actix/actix-extras/pull/226
## 0.6.0 - 2022-02-25
## 0.6.0
- Update `actix-web` dependency to 4.0.
## 0.6.0-beta.10 - 2022-02-07
## 0.6.0-beta.10
- Ensure that preflight responses contain a `Vary` header. [#224]
[#224]: https://github.com/actix/actix-extras/pull/224
## 0.6.0-beta.9 - 2022-02-07
## 0.6.0-beta.9
- Relax body type bounds on middleware impl. [#223]
- Update `actix-web` dependency to `4.0.0-rc.1`.
[#223]: https://github.com/actix/actix-extras/pull/223
## 0.6.0-beta.8 - 2021-12-29
## 0.6.0-beta.8
- Minimum supported Rust version (MSRV) is now 1.54.
## 0.6.0-beta.7 - 2021-12-18
## 0.6.0-beta.7
- Update `actix-web` dependency to `4.0.0-beta.15`. [#216]
[#216]: https://github.com/actix/actix-extras/pull/216
## 0.6.0-beta.6 - 2021-12-13
## 0.6.0-beta.6
- Fix panic when wrapping routes with dynamic segments in their paths. [#213]
[#213]: https://github.com/actix/actix-extras/pull/213
## 0.6.0-beta.5 - 2021-12-12 _(YANKED)_
## 0.6.0-beta.5 _(YANKED)_
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
[#209]: https://github.com/actix/actix-extras/pull/209
## 0.6.0-beta.4 - 2021-11-22
## 0.6.0-beta.4
- No significant changes since `0.6.0-beta.3`.
## 0.6.0-beta.3 - 2021-10-21
## 0.6.0-beta.3
- Make `Cors` middleware generic over body type [#195]
- Fix `expose_any_header` behavior. [#204]
@ -84,37 +84,37 @@
[#203]: https://github.com/actix/actix-extras/pull/203
[#204]: https://github.com/actix/actix-extras/pull/204
## 0.6.0-beta.2 - 2021-06-27
## 0.6.0-beta.2
- No notable changes.
## 0.6.0-beta.1 - 2021-04-02
## 0.6.0-beta.1
- Update `actix-web` dependency to 4.0.0 beta.
- Minimum supported Rust version (MSRV) is now 1.46.0.
## 0.5.4 - 2020-12-31
## 0.5.4
- Fix `expose_any_header` method, now set the correct field. [#143]
[#143]: https://github.com/actix/actix-extras/pull/143
## 0.5.3 - 2020-11-19
## 0.5.3
- Fix version spec for `derive_more` dependency.
## 0.5.2 - 2020-11-15
## 0.5.2
- Ensure `tinyvec` is using the correct features.
- Bump `futures-util` minimum version to `0.3.7` to avoid `RUSTSEC-2020-0059`.
## 0.5.1 - 2020-11-05
## 0.5.1
- Fix `allow_any_header` method, now set the correct field. [#121]
[#121]: https://github.com/actix/actix-extras/pull/121
## 0.5.0 - 2020-10-19
## 0.5.0
- Disallow `*` in `Cors::allowed_origin`. [#114].
- Hide `CorsMiddleware` from docs. [#118].
@ -134,13 +134,13 @@
[#119]: https://github.com/actix/actix-extras/pull/119
[#120]: https://github.com/actix/actix-extras/pull/120
## 0.4.1 - 2020-10-07
## 0.4.1
- Allow closures to be used with `allowed_origin_fn`. [#110]
[#110]: https://github.com/actix/actix-extras/pull/110
## 0.4.0 - 2020-09-27
## 0.4.0
- Implement `allowed_origin_fn` builder method. [#93]
- Use `TryInto` instead of `TryFrom` where applicable. [#106]
@ -148,13 +148,13 @@
[#93]: https://github.com/actix/actix-extras/pull/93
[#106]: https://github.com/actix/actix-extras/pull/106
## 0.3.0 - 2020-09-11
## 0.3.0
- Update `actix-web` dependency to 3.0.0.
- Minimum supported Rust version (MSRV) is now 1.42.0.
- Implement the Debug trait on all public types.
## 0.3.0-alpha.1 - 2020-03-11
## 0.3.0-alpha.1
- Minimize `futures-*` dependencies
- Update `actix-web` dependency to 3.0.0-alpha.1

View File

@ -9,9 +9,9 @@ description = "Cross-Origin Resource Sharing (CORS) controls for Actix Web"
keywords = ["actix", "cors", "web", "security", "crossorigin"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-extras.git"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -1,25 +1,25 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Replace use of `anyhow::Error` with specific error types. [#296]
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
[#296]: https://github.com/actix/actix-extras/pull/296
## 0.5.2 - 2022-07-19
## 0.5.2
- Fix visit deadline. [#263]
[#263]: https://github.com/actix/actix-extras/pull/263
## 0.5.1 - 2022-07-11
## 0.5.1
- Remove unnecessary dependencies. [#259]
[#259]: https://github.com/actix/actix-extras/pull/259
## 0.5.0 - 2022-07-11
## 0.5.0
`actix-identity` v0.5 is a complete rewrite. The goal is to streamline user experience and reduce maintenance overhead.
@ -55,56 +55,56 @@ Changes:
[#246]: https://github.com/actix/actix-extras/pull/246
## 0.4.0 - 2022-03-01
## 0.4.0
- Update `actix-web` dependency to `4`.
## 0.4.0-beta.9 - 2022-02-07
## 0.4.0-beta.9
- Relax body type bounds on middleware impl. [#223]
- Update `actix-web` dependency to `4.0.0-rc.1`.
[#223]: https://github.com/actix/actix-extras/pull/223
## 0.4.0-beta.8 - 2022-01-21
## 0.4.0-beta.8
- No significant changes since `0.4.0-beta.7`.
## 0.4.0-beta.7 - 2021-12-29
## 0.4.0-beta.7
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
- Minimum supported Rust version (MSRV) is now 1.54.
[#218]: https://github.com/actix/actix-extras/pull/218
## 0.4.0-beta.6 - 2021-12-18
## 0.4.0-beta.6
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]
[#216]: https://github.com/actix/actix-extras/pull/216
## 0.4.0-beta.5 - 2021-12-12
## 0.4.0-beta.5
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
[#209]: https://github.com/actix/actix-extras/pull/209
## 0.4.0-beta.4 - 2021-11-22
## 0.4.0-beta.4
- No significant changes since `0.4.0-beta.3`.
## 0.4.0-beta.3 - 2021-10-21
## 0.4.0-beta.3
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
- Minimum supported Rust version (MSRV) is now 1.52.
[#203]: https://github.com/actix/actix-extras/pull/203
## 0.4.0-beta.2 - 2021-06-27
## 0.4.0-beta.2
- No notable changes.
## 0.4.0-beta.1 - 2021-04-02
## 0.4.0-beta.1
- Rename `CookieIdentityPolicy::{max_age => max_age_secs}`. [#168]
- Rename `CookieIdentityPolicy::{max_age_time => max_age}`. [#168]
@ -113,24 +113,24 @@ Changes:
[#168]: https://github.com/actix/actix-extras/pull/168
## 0.3.1 - 2020-09-20
## 0.3.1
- Add method to set `HttpOnly` flag on cookie identity. [#102]
[#102]: https://github.com/actix/actix-extras/pull/102
## 0.3.0 - 2020-09-11
## 0.3.0
- Update `actix-web` dependency to 3.0.0.
- Minimum supported Rust version (MSRV) is now 1.42.0.
## 0.3.0-alpha.1 - 2020-03-14
## 0.3.0-alpha.1
- Update the `time` dependency to 0.2.7
- Update the `actix-web` dependency to 3.0.0-alpha.1
- Minimize `futures` dependency
## 0.2.1 - 2020-01-10
## 0.2.1
- Fix panic with already borrowed: BorrowMutError #1263

View File

@ -9,9 +9,9 @@ description = "Identity management for Actix Web"
keywords = ["actix", "auth", "identity", "web", "security"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-extras.git"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -1,10 +1,10 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Update `redis` dependency to `0.22`.
## 0.4.0 - 2022-09-10
## 0.4.0
- Add `Builder::key_by` for setting a custom rate limit key function.
- Implement `Default` for `RateLimiter`.
@ -12,13 +12,13 @@
- In the middleware errors from the count function are matched and respond with `INTERNAL_SERVER_ERROR` if it's an unexpected error, instead of the default `TOO_MANY_REQUESTS`.
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
## 0.3.0 - 2022-07-11
## 0.3.0
- `Limiter::builder` now takes an `impl Into<String>`.
- Removed lifetime from `Builder`.
- Updated `actix-session` dependency to `0.7`.
## 0.2.0 - 2022-03-22
## 0.2.0
- Update Actix Web dependency to v4 ecosystem.
- Update Tokio dependencies to v1 ecosystem.
@ -26,6 +26,6 @@
- Rename `Builder::{finish => build}()`.
- Exceeding the rate limit now returns a 429 Too Many Requests response.
## 0.1.4 - 2022-03-18
## 0.1.4
- Adopted into @actix org from <https://github.com/0xmad/actix-limitation>.

View File

@ -9,9 +9,9 @@ description = "Rate limiter using a fixed window counter for arbitrary keys, bac
keywords = ["actix-web", "rate-api", "rate-limit", "limitation"]
categories = ["asynchronous", "web-programming"]
repository = "https://github.com/actix/actix-extras.git"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -1,39 +1,39 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
## 0.9.0 - 2022-08-24
## 0.9.0
- Added `application/x-protobuf` as an acceptable header.
- Updated `prost` dependency to `0.11`.
## 0.8.0 - 2022-06-25
## 0.8.0
- Update `prost` dependency to `0.10`.
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
## 0.7.0 - 2022-03-01
## 0.7.0
- Update `actix-web` dependency to `4`.
## 0.7.0-beta.5 - 2022-02-03
## 0.7.0-beta.5
- Update `prost` dependency to `0.9`.
- Update `actix-web` dependency to `4.0.0-rc.1`.
## 0.7.0-beta.4 - 2021-12-29
## 0.7.0-beta.4
- Minimum supported Rust version (MSRV) is now 1.54.
## 0.7.0-beta.3 - 2021-12-12
## 0.7.0-beta.3
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
[#209]: https://github.com/actix/actix-extras/pull/209
## 0.7.0-beta.2 - 2021-10-21
## 0.7.0-beta.2
- Bump `prost` version to 0.8. [#197]
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
@ -42,7 +42,7 @@
[#197]: https://github.com/actix/actix-extras/pull/197
[#203]: https://github.com/actix/actix-extras/pull/203
## 0.7.0-beta.1 - 2021-06-27
## 0.7.0-beta.1
- Bump `prost` version to 0.7. [#144]
- Update `actix-web` dependency to 4.0.0 beta.
@ -50,12 +50,12 @@
[#144]: https://github.com/actix/actix-extras/pull/144
## 0.6.0 - 2020-09-11
## 0.6.0
- Update `actix-web` dependency to 3.0.0.
- Minimum supported Rust version (MSRV) is now 1.42.0 to use `matches!` macro.
## 0.6.0-alpha.1 - 2020-07-06
## 0.6.0-alpha.1
- Update `actix-web` to 3.0.0-alpha.3
- Minimum supported Rust version(MSRV) is now 1.40.0.

View File

@ -9,9 +9,9 @@ description = "Protobuf payload extractor for Actix Web"
keywords = ["actix", "web", "protobuf", "protocol", "rpc"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-extras.git"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -1,18 +1,18 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Update `redis-async` dependency to `0.14`.
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
## 0.12.0 - 2022-07-09
## 0.12.0
- Update `actix` dependency to `0.13`.
- Update `redis-async` dependency to `0.13`.
- Update `tokio-util` dependency to `0.7`.
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
## 0.11.0 - 2022-03-15
## 0.11.0
### Removed
@ -24,22 +24,22 @@
[#212]: https://github.com/actix/actix-extras/pull/212
## 0.10.0 - 2022-03-01
## 0.10.0
- Update `actix-web` dependency to `4`.
## 0.10.0-beta.6 - 2022-02-07
## 0.10.0-beta.6
- Update `actix-web` dependency to `4.0.0-rc.1`.
## 0.10.0-beta.5 - 2021-12-29
## 0.10.0-beta.5
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
- Minimum supported Rust version (MSRV) is now 1.54.
[#218]: https://github.com/actix/actix-extras/pull/218
## 0.10.0-beta.4 - 2021-12-12
## 0.10.0-beta.4
- A session will be created in Redis if and only if there is some data inside the session state. This reduces the performance impact of `RedisSession` on routes that do not leverage sessions. [#207]
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
@ -47,23 +47,23 @@
[#207]: https://github.com/actix/actix-extras/pull/207
[#209]: https://github.com/actix/actix-extras/pull/209
## 0.10.0-beta.3 - 2021-10-21
## 0.10.0-beta.3
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
- Minimum supported Rust version (MSRV) is now 1.52.
[#203]: https://github.com/actix/actix-extras/pull/203
## 0.10.0-beta.2 - 2021-06-27
## 0.10.0-beta.2
- No notable changes.
## 0.10.0-beta.1 - 2021-04-02
## 0.10.0-beta.1
- Update `actix-web` dependency to 4.0.0 beta.
- Minimum supported Rust version (MSRV) is now 1.46.0.
## 0.9.2 - 2021-03-21
## 0.9.2
- Implement `std::error::Error` for `Error` [#135]
- Allow the removal of `Max-Age` for session-only cookies. [#161]
@ -71,16 +71,16 @@
[#135]: https://github.com/actix/actix-extras/pull/135
[#161]: https://github.com/actix/actix-extras/pull/161
## 0.9.1 - 2020-09-12
## 0.9.1
- Enforce minimum redis-async version of 0.6.3 to workaround breaking patch change.
## 0.9.0 - 2020-09-11
## 0.9.0
- Update `actix-web` dependency to 3.0.0.
- Minimize `futures` dependency.
## 0.9.0-alpha.2 - 2020-05-17
## 0.9.0-alpha.2
- Add `cookie_http_only` functionality to RedisSession builder, setting this
to false allows JavaScript to access cookies. Defaults to true.
@ -89,14 +89,14 @@
- Update `tokio-util` to 0.3
- Minimum supported Rust version(MSRV) is now 1.40.0.
## 0.9.0-alpha.1 - 2020-03-28
## 0.9.0-alpha.1
- Update `actix` to 0.10.0-alpha.2
- Update `actix-session` to 0.4.0-alpha.1
- Update `actix-web` to 3.0.0-alpha.1
- Update `time` to 0.2.9
## 0.8.1 - 2020-02-18
## 0.8.1
- Move `env_logger` dependency to dev-dependencies and update to 0.7
- Update `actix_web` to 2.0.0 from 2.0.0-rc

View File

@ -3,13 +3,13 @@ name = "actix-redis"
version = "0.12.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actor-based Redis client"
license = "MIT OR Apache-2.0"
keywords = ["actix", "redis", "async"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-extras.git"
categories = ["network-programming", "asynchronous"]
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -1,25 +1,25 @@
# Changes
## Unreleased - 2021-xx-xx
## Unreleased
- Set secure attribute when adding a session removal cookie.
- Update `redis` dependency to `0.22`.
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
## 0.7.2 - 2022-09-11
## 0.7.2
- Set SameSite attribute when adding a session removal cookie. [#284]
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
[#284]: https://github.com/actix/actix-extras/pull/284
## 0.7.1 - 2022-07-24
## 0.7.1
- Fix interaction between session state changes and renewal. [#265]
[#265]: https://github.com/actix/actix-extras/pull/265
## 0.7.0 - 2022-07-09
## 0.7.0
- Added `TtlExtensionPolicy` enum to support different strategies for extending the TTL attached to the session state. `TtlExtensionPolicy::OnEveryRequest` now allows for long-lived sessions that do not expire if the user remains active. [#233]
- `SessionLength` is now called `SessionLifecycle`. [#233]
@ -36,7 +36,7 @@
[#233]: https://github.com/actix/actix-extras/pull/233
## 0.6.2 - 2022-03-25
## 0.6.2
- Implement `SessionExt` for `GuardContext`. [#234]
- `RedisSessionStore` will prevent connection timeouts from causing user-visible errors. [#235]
@ -46,11 +46,11 @@
[#236]: https://github.com/actix/actix-extras/pull/236
[#235]: https://github.com/actix/actix-extras/pull/235
## 0.6.1 - 2022-03-21
## 0.6.1
- No significant changes since `0.6.0`.
## 0.6.0 - 2022-03-15
## 0.6.0
### Added
@ -72,28 +72,28 @@
[#212]: https://github.com/actix/actix-extras/pull/212
## 0.5.0 - 2022-03-01
## 0.5.0
- Update `actix-web` dependency to `4`.
## 0.5.0-beta.8 - 2022-02-07
## 0.5.0-beta.8
- Update `actix-web` dependency to `4.0.0-rc.1`.
## 0.5.0-beta.7 - 2021-12-29
## 0.5.0-beta.7
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
- Minimum supported Rust version (MSRV) is now 1.54.
[#218]: https://github.com/actix/actix-extras/pull/218
## 0.5.0-beta.6 - 2021-12-18
## 0.5.0-beta.6
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]
[#216]: https://github.com/actix/actix-extras/pull/216
## 0.5.0-beta.5 - 2021-12-12
## 0.5.0-beta.5
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
- Remove `UserSession` implementation for `RequestHead`. [#209]
@ -102,11 +102,11 @@
[#207]: https://github.com/actix/actix-extras/pull/207
[#209]: https://github.com/actix/actix-extras/pull/209
## 0.5.0-beta.4 - 2021-11-22
## 0.5.0-beta.4
- No significant changes since `0.5.0-beta.3`.
## 0.5.0-beta.3 - 2021-10-21
## 0.5.0-beta.3
- Impl `Clone` for `CookieSession`. [#201]
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
@ -115,11 +115,11 @@
[#201]: https://github.com/actix/actix-extras/pull/201
[#203]: https://github.com/actix/actix-extras/pull/203
## 0.5.0-beta.2 - 2021-06-27
## 0.5.0-beta.2
- No notable changes.
## 0.5.0-beta.1 - 2021-04-02
## 0.5.0-beta.1
- Add `Session::entries`. [#170]
- Rename `Session::{set => insert}` to match standard hash map naming. [#170]
@ -132,7 +132,7 @@
[#170]: https://github.com/actix/actix-extras/pull/170
## 0.4.1 - 2021-03-21
## 0.4.1
- `Session::set_session` takes a `IntoIterator` instead of `Iterator`. [#105]
- Fix calls to `session.purge()` from paths other than the one specified in the cookie. [#129]
@ -140,12 +140,12 @@
[#105]: https://github.com/actix/actix-extras/pull/105
[#129]: https://github.com/actix/actix-extras/pull/129
## 0.4.0 - 2020-09-11
## 0.4.0
- Update `actix-web` dependency to 3.0.0.
- Minimum supported Rust version (MSRV) is now 1.42.0.
## 0.4.0-alpha.1 - 2020-03-14
## 0.4.0-alpha.1
- Update the `time` dependency to 0.2.7
- Update the `actix-web` dependency to 3.0.0-alpha.1

View File

@ -9,9 +9,9 @@ description = "Session management for Actix We"
keywords = ["http", "web", "framework", "async", "session"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-extras.git"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -46,7 +46,7 @@ use serde::{de::DeserializeOwned, Serialize};
pub struct Session(Rc<RefCell<SessionInner>>);
/// Status of a [`Session`].
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub enum SessionStatus {
/// Session state has been updated - the changes will have to be persisted to the backend.
Changed,
@ -64,15 +64,10 @@ pub enum SessionStatus {
Renewed,
/// The session state has not been modified since its creation/retrieval.
#[default]
Unchanged,
}
impl Default for SessionStatus {
fn default() -> SessionStatus {
SessionStatus::Unchanged
}
}
#[derive(Default)]
struct SessionInner {
state: HashMap<String, String>,
@ -218,6 +213,7 @@ impl Session {
///
/// Values that match keys already existing on the session will be overwritten. Values should
/// already be JSON serialized.
#[allow(clippy::needless_pass_by_ref_mut)]
pub(crate) fn set_session(
req: &mut ServiceRequest,
data: impl IntoIterator<Item = (String, String)>,
@ -232,6 +228,7 @@ impl Session {
/// This is a destructive operation - the session state is removed from the request extensions
/// typemap, leaving behind a new empty map. It should only be used when the session is being
/// finalised (i.e. in `SessionMiddleware`).
#[allow(clippy::needless_pass_by_ref_mut)]
pub(crate) fn get_changes<B>(
res: &mut ServiceResponse<B>,
) -> (SessionStatus, HashMap<String, String>) {

View File

@ -261,6 +261,7 @@ impl RedisSessionStore {
/// This helper method catches this case (`.is_connection_dropped`) to execute a retry. The
/// retry will be executed on a fresh connection, therefore it is likely to succeed (or fail for
/// a different more meaningful reason).
#[allow(clippy::needless_pass_by_ref_mut)]
async fn execute_command<T: FromRedisValue>(&self, cmd: &mut Cmd) -> RedisResult<T> {
let mut can_retry = true;

View File

@ -69,15 +69,18 @@ impl SessionStore for MockStore {
_session_state: HashMap<String, String>,
_ttl: &Duration,
) -> Result<SessionKey, UpdateError> {
todo!()
#![allow(clippy::diverging_sub_expression)]
unimplemented!()
}
async fn update_ttl(&self, _session_key: &SessionKey, _ttl: &Duration) -> Result<(), Error> {
todo!()
#![allow(clippy::diverging_sub_expression)]
unimplemented!()
}
async fn delete(&self, _session_key: &SessionKey) -> Result<(), Error> {
todo!()
#![allow(clippy::diverging_sub_expression)]
unimplemented!()
}
}

View File

@ -1,17 +1,17 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Rename `AtError => Error`.
- Remove `AtResult` type alias.
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
## 0.6.0 - 2022-07-31
## 0.6.0
- Update Actix Web dependencies to v4 ecosystem.
- Rename `actix.ssl` settings object to `actix.tls`.
- `NoSettings` is now marked `#[non_exhaustive]`.
## 0.5.2 - 2022-07-31
## 0.5.2
- Adopted into @actix org from <https://github.com/jjpe/actix-settings>.

View File

@ -6,9 +6,9 @@ authors = [
"Rob Ede <robjtede@icloud.com>",
]
description = "Easily manage Actix Web's settings from a TOML file and environment variables"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -1,10 +1,10 @@
# Changes
## Unreleased - 2022-xx-xx
## Unreleased
- Minimum supported Rust version (MSRV) is now 1.60.
- Minimum supported Rust version (MSRV) is now 1.68.
## 0.8.0 - 2022-07-21
## 0.8.0
- Removed `AuthExtractor` trait; implement `FromRequest` for your custom auth types. [#264]
- `BasicAuth::user_id()` now returns `&str`. [#249]
@ -16,74 +16,74 @@
[#249]: https://github.com/actix/actix-extras/pull/249
[#264]: https://github.com/actix/actix-extras/pull/264
## 0.7.0 - 2022-07-19
## 0.7.0
- Auth validator functions now need to return `(Error, ServiceRequest)` in error cases. [#260]
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
[#260]: https://github.com/actix/actix-extras/pull/260
## 0.6.0 - 2022-03-01
## 0.6.0
- Update `actix-web` dependency to `4`.
## 0.6.0-beta.8 - 2022-02-07
## 0.6.0-beta.8
- Relax body type bounds on middleware impl. [#223]
- Update `actix-web` dependency to `4.0.0-rc.1`.
[#223]: https://github.com/actix/actix-extras/pull/223
## 0.6.0-beta.7 - 2021-12-29
## 0.6.0-beta.7
- Minimum supported Rust version (MSRV) is now 1.54.
## 0.6.0-beta.6 - 2021-12-18
## 0.6.0-beta.6
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]
[#216]: https://github.com/actix/actix-extras/pull/216
## 0.6.0-beta.5 - 2021-12-12
## 0.6.0-beta.5
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
[#209]: https://github.com/actix/actix-extras/pull/209
## 0.6.0-beta.4 - 2021-11-22
## 0.6.0-beta.4
- impl `AuthExtractor` trait for `Option<T: AuthExtractor>` and `Result<T: AuthExtractor, T::Error>`. [#205]
[#205]: https://github.com/actix/actix-extras/pull/205
## 0.6.0-beta.3 - 2021-10-21
## 0.6.0-beta.3
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
- Minimum supported Rust version (MSRV) is now 1.52.
[#203]: https://github.com/actix/actix-extras/pull/203
## 0.6.0-beta.2 - 2021-06-27
## 0.6.0-beta.2
- No notable changes.
## 0.6.0-beta.1 - 2021-04-02
## 0.6.0-beta.1
- Update `actix-web` dependency to 4.0.0 beta.
- Minimum supported Rust version (MSRV) is now 1.46.0.
## 0.5.1 - 2021-03-21
## 0.5.1
- Correct error handling when extracting auth details from request. [#128]
[#128]: https://github.com/actix/actix-extras/pull/128
## 0.5.0 - 2020-09-11
## 0.5.0
- Update `actix-web` dependency to 3.0.0.
- Minimum supported Rust version (MSRV) is now 1.42.0.
## 0.4.2 - 2020-07-08
## 0.4.2
- Update the `base64` dependency to 0.12
- AuthenticationError's status code is preserved when converting to a ResponseError
@ -92,11 +92,11 @@
[#69]: https://github.com/actix/actix-web-httpauth/pull/69
## 0.4.1 - 2020-02-19
## 0.4.1
- Move repository to actix-extras
## 0.4.0 - 2020-01-14
## 0.4.0
- Depends on `actix-web = "^2.0"`, `actix-service = "^1.0"`, and `futures = "^0.3"` version now ([#14])
- Depends on `bytes = "^0.5"` and `base64 = "^0.11"` now

View File

@ -10,9 +10,9 @@ keywords = ["http", "web", "framework", "authentication", "security"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-extras.git"
categories = ["web-programming::http-server"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.60"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

View File

@ -102,7 +102,7 @@ impl FromRequest for BearerAuth {
let bearer = req
.app_data::<Config>()
.map(|config| config.0.clone())
.unwrap_or_else(Default::default);
.unwrap_or_default();
AuthenticationError::new(bearer)
}),

View File

@ -55,7 +55,7 @@ impl Scheme for Basic {
let mut parts = header.to_str()?.splitn(2, ' ');
match parts.next() {
Some(scheme) if scheme == "Basic" => (),
Some("Basic") => (),
_ => return Err(ParseError::MissingScheme),
}

View File

@ -50,7 +50,7 @@ impl Scheme for Bearer {
let mut parts = header.to_str()?.splitn(2, ' ');
match parts.next() {
Some(scheme) if scheme == "Bearer" => {}
Some("Bearer") => {}
_ => return Err(ParseError::MissingScheme),
}

View File

@ -1 +0,0 @@
msrv = "1.60"