1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-17 08:33:30 +01:00

Use matches macro to fix clippy warnings (#86)

This commit is contained in:
Yuki Okushi 2020-07-21 02:20:23 +09:00 committed by GitHub
parent 693c2f5041
commit e5fe8d42fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 9 deletions

View File

@ -14,6 +14,7 @@ jobs:
matrix: matrix:
version: version:
- 1.40.0 - 1.40.0
- 1.42.0
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -42,7 +43,17 @@ jobs:
with: with:
command: test command: test
args: --package=actix-cors args: --package=actix-cors
--package=actix-protobuf --package=actix-identity
--package=actix-redis --package=actix-redis
--package=actix-session
--package=actix-web-httpauth --package=actix-web-httpauth
--all-features --no-fail-fast -- --nocapture --all-features --no-fail-fast -- --nocapture
- name: tests (1.42.0)
if: matrix.version == '1.42.0'
uses: actions-rs/cargo@v1
timeout-minutes: 40
with:
command: test
args: --package=actix-protobuf
--all-features --no-fail-fast -- --nocapture

View File

@ -8,3 +8,6 @@ members = [
"actix-session", "actix-session",
"actix-web-httpauth", "actix-web-httpauth",
] ]
[patch.crates-io]
actix-session = { path = "actix-session" }

View File

@ -1,5 +1,9 @@
# Changes # Changes
## unreleased
* 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 (2020-07-06)
* Update `actix-web` to 3.0.0-alpha.3 * Update `actix-web` to 3.0.0-alpha.3

View File

@ -272,14 +272,12 @@ mod tests {
impl PartialEq for ProtoBufPayloadError { impl PartialEq for ProtoBufPayloadError {
fn eq(&self, other: &ProtoBufPayloadError) -> bool { fn eq(&self, other: &ProtoBufPayloadError) -> bool {
match *self { match *self {
ProtoBufPayloadError::Overflow => match *other { ProtoBufPayloadError::Overflow => {
ProtoBufPayloadError::Overflow => true, matches!(*other, ProtoBufPayloadError::Overflow)
_ => false, }
}, ProtoBufPayloadError::ContentType => {
ProtoBufPayloadError::ContentType => match *other { matches!(*other, ProtoBufPayloadError::ContentType)
ProtoBufPayloadError::ContentType => true, }
_ => false,
},
_ => false, _ => false,
} }
} }