add non_exhaustive to encoder error

This commit is contained in:
Rob Ede 2021-04-22 18:10:09 +01:00
parent 375a067495
commit 95d96ec41d
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 3 additions and 1 deletions

View File

@ -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");

View File

@ -311,6 +311,7 @@ impl ContentEncoder {
}
#[derive(Debug, Display)]
#[non_exhaustive]
pub enum EncoderError<E> {
#[display(fmt = "body")]
Body(E),