Fix clippy lint (#383)

This commit is contained in:
Derek Croote 2021-11-05 02:22:51 -07:00 committed by GitHub
parent f92f4f516a
commit e8bab82d76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,19 +184,19 @@ mod test {
#[tokio::test]
async fn test_stats() {
let stata = [
let status_codes = [
StatusCode::OK,
StatusCode::PERMANENT_REDIRECT,
StatusCode::BAD_GATEWAY,
];
let mut stats = ResponseStats::new();
for status in &stata {
for status in &status_codes {
stats.add(get_mock_status_response(status).await);
}
let mut expected_map: HashMap<Input, HashSet<ResponseBody>> = HashMap::new();
for status in &stata {
for status in &status_codes {
if status.is_server_error() || status.is_client_error() || status.is_redirection() {
let Response(input, response_body) = get_mock_status_response(status).await;
let entry = expected_map.entry(input).or_default();