diff --git a/actix-http/src/body/mod.rs b/actix-http/src/body/mod.rs index 8346109e8..d21cca60b 100644 --- a/actix-http/src/body/mod.rs +++ b/actix-http/src/body/mod.rs @@ -76,7 +76,6 @@ mod tests { use bytes::{Bytes, BytesMut}; use super::*; - // use crate::Error; impl Body { pub(crate) fn get_ref(&self) -> &[u8] { @@ -239,6 +238,8 @@ mod tests { ); } + // down-casting used to be done with a method on MessageBody trait + // test is kept to demonstrate equivalence of Any trait #[actix_rt::test] async fn test_body_casting() { let mut body = String::from("hello cast"); diff --git a/actix-http/src/encoding/encoder.rs b/actix-http/src/encoding/encoder.rs index bd8c9e991..b8bc8b68d 100644 --- a/actix-http/src/encoding/encoder.rs +++ b/actix-http/src/encoding/encoder.rs @@ -311,6 +311,7 @@ impl ContentEncoder { } #[derive(Debug, Display)] +#[non_exhaustive] pub enum EncoderError { #[display(fmt = "body")] Body(E),