1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +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:
version:
- 1.40.0
- 1.42.0
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
@ -42,7 +43,17 @@ jobs:
with:
command: test
args: --package=actix-cors
--package=actix-protobuf
--package=actix-identity
--package=actix-redis
--package=actix-session
--package=actix-web-httpauth
--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-web-httpauth",
]
[patch.crates-io]
actix-session = { path = "actix-session" }

View File

@ -1,5 +1,9 @@
# Changes
## unreleased
* Minimum supported Rust version(MSRV) is now 1.42.0 to use `matches!` macro.
## 0.6.0-alpha.1 (2020-07-06)
* Update `actix-web` to 3.0.0-alpha.3

View File

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