1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +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

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