Reimplement std::error::Error for Error.

Emmanuel Gil Peyrot created

It was removed with the removal of failure, but like in minidom (#18) it
was probably used by people, so let’s reintroduce it.

Change summary

src/lib.rs | 3 +++
1 file changed, 3 insertions(+)

Detailed changes

src/lib.rs 🔗

@@ -15,6 +15,7 @@
 //! For usage, check the documentation on the `Jid` struct.
 
 use std::convert::Into;
+use std::error::Error as StdError;
 use std::fmt;
 use std::str::FromStr;
 
@@ -35,6 +36,8 @@ pub enum JidParseError {
     EmptyResource,
 }
 
+impl StdError for JidParseError {}
+
 impl fmt::Display for JidParseError {
     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         write!(fmt, "{}", match self {