mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 09:12:57 +01:00
Use matches
macro to fix clippy warnings (#86)
This commit is contained in:
parent
693c2f5041
commit
e5fe8d42fa
13
.github/workflows/msrv.yml
vendored
13
.github/workflows/msrv.yml
vendored
@ -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
|
||||
|
@ -8,3 +8,6 @@ members = [
|
||||
"actix-session",
|
||||
"actix-web-httpauth",
|
||||
]
|
||||
|
||||
[patch.crates-io]
|
||||
actix-session = { path = "actix-session" }
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user