fix clippy

This commit is contained in:
fakeshadow 2021-02-23 18:41:22 +08:00
parent 2a2fc6022b
commit 4aa45055bf
3 changed files with 4 additions and 10 deletions

View File

@ -1,10 +1,10 @@
use std::{
convert::TryFrom,
future::Future,
net::SocketAddr,
pin::Pin,
rc::Rc,
task::{Context, Poll},
convert::TryFrom
};
use actix_http::{

View File

@ -400,12 +400,8 @@ mod tests {
UrlencodedError::Overflow { .. } => {
matches!(other, UrlencodedError::Overflow { .. })
}
UrlencodedError::UnknownLength => {
matches!(other, UrlencodedError::UnknownLength)
}
UrlencodedError::ContentType => {
matches!(other, UrlencodedError::ContentType)
}
UrlencodedError::UnknownLength => matches!(other, UrlencodedError::UnknownLength),
UrlencodedError::ContentType => matches!(other, UrlencodedError::ContentType),
_ => false,
}
}

View File

@ -441,9 +441,7 @@ mod tests {
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
match err {
JsonPayloadError::Overflow => matches!(other, JsonPayloadError::Overflow),
JsonPayloadError::ContentType => {
matches!(other, JsonPayloadError::ContentType)
}
JsonPayloadError::ContentType => matches!(other, JsonPayloadError::ContentType),
_ => false,
}
}