mirror of https://github.com/fafhrd91/actix-web
add non_exhaustive to encoder error
This commit is contained in:
parent
375a067495
commit
95d96ec41d
|
@ -76,7 +76,6 @@ mod tests {
|
||||||
use bytes::{Bytes, BytesMut};
|
use bytes::{Bytes, BytesMut};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
// use crate::Error;
|
|
||||||
|
|
||||||
impl Body {
|
impl Body {
|
||||||
pub(crate) fn get_ref(&self) -> &[u8] {
|
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]
|
#[actix_rt::test]
|
||||||
async fn test_body_casting() {
|
async fn test_body_casting() {
|
||||||
let mut body = String::from("hello cast");
|
let mut body = String::from("hello cast");
|
||||||
|
|
|
@ -311,6 +311,7 @@ impl ContentEncoder {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Display)]
|
#[derive(Debug, Display)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum EncoderError<E> {
|
pub enum EncoderError<E> {
|
||||||
#[display(fmt = "body")]
|
#[display(fmt = "body")]
|
||||||
Body(E),
|
Body(E),
|
||||||
|
|
Loading…
Reference in New Issue