1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 16:55:08 +02:00

add client middleware (#2013)

This commit is contained in:
fakeshadow
2021-02-28 10:17:08 -08:00
committed by GitHub
parent badae2f8fd
commit c836de44af
9 changed files with 570 additions and 65 deletions

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