mirror of https://github.com/fafhrd91/actix-web
fix tests
This commit is contained in:
parent
617734b534
commit
cfc84b4e29
|
@ -436,6 +436,22 @@ pub enum ContentTypeError {
|
||||||
UnknownEncoding,
|
UnknownEncoding,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod content_type_test_impls {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
impl std::cmp::PartialEq for ContentTypeError {
|
||||||
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
match self {
|
||||||
|
Self::ParseError => matches!(other, ContentTypeError::ParseError),
|
||||||
|
Self::UnknownEncoding => {
|
||||||
|
matches!(other, ContentTypeError::UnknownEncoding)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Return `BadRequest` for `ContentTypeError`
|
/// Return `BadRequest` for `ContentTypeError`
|
||||||
impl ResponseError for ContentTypeError {
|
impl ResponseError for ContentTypeError {
|
||||||
fn status_code(&self) -> StatusCode {
|
fn status_code(&self) -> StatusCode {
|
||||||
|
|
Loading…
Reference in New Issue