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:
@ -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,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user