diff --git a/actix-http/src/error.rs b/actix-http/src/error.rs index 92efd572d..203656bdd 100644 --- a/actix-http/src/error.rs +++ b/actix-http/src/error.rs @@ -44,6 +44,7 @@ impl Error { } /// Errors that can generate responses. +// TODO: add std::error::Error bound when replacement for Box is found pub trait ResponseError: fmt::Debug + fmt::Display { /// Returns appropriate status code for error. /// diff --git a/actix-http/src/ws/mod.rs b/actix-http/src/ws/mod.rs index 22df2b4ff..3571bb379 100644 --- a/actix-http/src/ws/mod.rs +++ b/actix-http/src/ws/mod.rs @@ -25,7 +25,7 @@ pub use self::frame::Parser; pub use self::proto::{hash_key, CloseCode, CloseReason, OpCode}; /// WebSocket protocol errors. -#[derive(Debug, Display, From, Error)] +#[derive(Debug, Display, Error, From)] pub enum ProtocolError { /// Received an unmasked frame from client. #[display(fmt = "Received an unmasked frame from client.")] @@ -71,7 +71,7 @@ pub enum ProtocolError { impl ResponseError for ProtocolError {} /// WebSocket handshake errors -#[derive(PartialEq, Debug, Display)] +#[derive(Debug, PartialEq, Display, Error)] pub enum HandshakeError { /// Only get method is allowed. #[display(fmt = "Method not allowed.")]