mirror of https://github.com/fafhrd91/actix-web
fix clippy
This commit is contained in:
parent
2a2fc6022b
commit
4aa45055bf
|
@ -1,10 +1,10 @@
|
||||||
use std::{
|
use std::{
|
||||||
|
convert::TryFrom,
|
||||||
future::Future,
|
future::Future,
|
||||||
net::SocketAddr,
|
net::SocketAddr,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
rc::Rc,
|
rc::Rc,
|
||||||
task::{Context, Poll},
|
task::{Context, Poll},
|
||||||
convert::TryFrom
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use actix_http::{
|
use actix_http::{
|
||||||
|
|
|
@ -400,12 +400,8 @@ mod tests {
|
||||||
UrlencodedError::Overflow { .. } => {
|
UrlencodedError::Overflow { .. } => {
|
||||||
matches!(other, UrlencodedError::Overflow { .. })
|
matches!(other, UrlencodedError::Overflow { .. })
|
||||||
}
|
}
|
||||||
UrlencodedError::UnknownLength => {
|
UrlencodedError::UnknownLength => matches!(other, UrlencodedError::UnknownLength),
|
||||||
matches!(other, UrlencodedError::UnknownLength)
|
UrlencodedError::ContentType => matches!(other, UrlencodedError::ContentType),
|
||||||
}
|
|
||||||
UrlencodedError::ContentType => {
|
|
||||||
matches!(other, UrlencodedError::ContentType)
|
|
||||||
}
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -441,9 +441,7 @@ mod tests {
|
||||||
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
|
fn json_eq(err: JsonPayloadError, other: JsonPayloadError) -> bool {
|
||||||
match err {
|
match err {
|
||||||
JsonPayloadError::Overflow => matches!(other, JsonPayloadError::Overflow),
|
JsonPayloadError::Overflow => matches!(other, JsonPayloadError::Overflow),
|
||||||
JsonPayloadError::ContentType => {
|
JsonPayloadError::ContentType => matches!(other, JsonPayloadError::ContentType),
|
||||||
matches!(other, JsonPayloadError::ContentType)
|
|
||||||
}
|
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue