diff --git a/actix-http/src/client/connector.rs b/actix-http/src/client/connector.rs index 7d6fca25a..98e8618c3 100644 --- a/actix-http/src/client/connector.rs +++ b/actix-http/src/client/connector.rs @@ -269,9 +269,9 @@ where .map(|protos| protos.windows(2).any(|w| w == H2)) .unwrap_or(false); if h2 { - (Box::new(sock) as Box, Protocol::Http2) + (Box::new(sock) as Box, Protocol::Http2) } else { - (Box::new(sock) as Box, Protocol::Http1) + (Box::new(sock) as Box, Protocol::Http1) } }), ), @@ -288,9 +288,9 @@ where .map(|protos| protos.windows(2).any(|w| w == H2)) .unwrap_or(false); if h2 { - (Box::new(sock) as Box, Protocol::Http2) + (Box::new(sock) as Box, Protocol::Http2) } else { - (Box::new(sock) as Box, Protocol::Http1) + (Box::new(sock) as Box, Protocol::Http1) } }), ), diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index dcbc3cc93..2c01c86db 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -1072,7 +1072,7 @@ mod tests { #[test] fn test_error_casting() { let err = PayloadError::Overflow; - let resp_err: &ResponseError = &err; + let resp_err: &dyn ResponseError = &err; let err = resp_err.downcast_ref::().unwrap(); assert_eq!(err.to_string(), "A payload reached size limit."); let not_err = resp_err.downcast_ref::(); diff --git a/src/middleware/normalize.rs b/src/middleware/normalize.rs index 427f954fe..9cfbefb30 100644 --- a/src/middleware/normalize.rs +++ b/src/middleware/normalize.rs @@ -151,5 +151,4 @@ mod tests { let res = block_on(normalize.call(req)).unwrap(); assert!(res.status().is_success()); } - } diff --git a/src/resource.rs b/src/resource.rs index 0af43a424..b872049d0 100644 --- a/src/resource.rs +++ b/src/resource.rs @@ -763,5 +763,4 @@ mod tests { let resp = call_service(&mut srv, req); assert_eq!(resp.status(), StatusCode::NO_CONTENT); } - } diff --git a/src/types/form.rs b/src/types/form.rs index ec6e6cd09..9ab98b17b 100644 --- a/src/types/form.rs +++ b/src/types/form.rs @@ -482,5 +482,4 @@ mod tests { use crate::responder::tests::BodyTest; assert_eq!(resp.body().bin_ref(), b"hello=world&counter=123"); } - }