1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 10:27:42 +02: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
4 changed files with 25 additions and 9 deletions

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,
}
}