Skip to content

Commit

Permalink
Merge pull request #300 from SenneH/master
Browse files Browse the repository at this point in the history
Implemented From trait for EscapeError to Error
  • Loading branch information
tafia committed Aug 10, 2021
2 parents 4d06891 + 1fd58ac commit 56052da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ impl From<::std::str::Utf8Error> for Error {
}
}

impl From<::escape::EscapeError> for Error {
/// Creates a new `Error::EscapeError` from the given error
#[inline]
fn from(error: ::escape::EscapeError) -> Error {
Error::EscapeError(error)
}
}

/// A specialized `Result` type where the error is hard-wired to [`Error`].
///
/// [`Error`]: enum.Error.html
Expand Down

0 comments on commit 56052da

Please sign in to comment.