Skip to content

Commit

Permalink
Merge pull request snapview#186 from de-vri-es/more-from-for-error
Browse files Browse the repository at this point in the history
Implement From<CapacityError> and From<UrlError> for Error.
  • Loading branch information
daniel-abramov committed Mar 4, 2021
2 parents 3721ca8 + abebb33 commit e6fee89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Expand Up @@ -48,7 +48,7 @@ pub enum Error {
/// - When writing: your message is bigger than the configured max message size
/// (64MB by default).
#[error("Space limit exceeded: {0}")]
Capacity(CapacityError),
Capacity(#[from] CapacityError),
/// Protocol violation.
#[error("WebSocket protocol error: {0}")]
Protocol(#[from] ProtocolError),
Expand All @@ -60,7 +60,7 @@ pub enum Error {
Utf8,
/// Invalid URL.
#[error("URL error: {0}")]
Url(UrlError),
Url(#[from] UrlError),
/// HTTP error.
#[error("HTTP error: {}", .0.status())]
Http(Response<Option<String>>),
Expand Down

0 comments on commit e6fee89

Please sign in to comment.