Repository: PistonDevelopers/glfw-rs (language: rust)

Issue:
Why removing std::error::Error support?
Hello,

In 087fc4bf7c7e441f460f0334521827be17122f7a, you removed support of `std::error::Error`, which causes a breaking-change. Would you accept a PR to re-introduce it?

![](https://phaazon.net/media/uploads/evil_grin_girl.gif)


Discussion / hints:
Yeah, this was a mistake. Sorry!

Fix patch:
diff --git a/src/lib.rs b/src/lib.rs
index 3b61966d..ca75fb99 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -91,6 +91,7 @@ use libc::{c_char, c_double, c_float, c_int};
 use libc::{c_uchar, c_ushort, c_void};
 use raw_window_handle::{HasRawWindowHandle, RawWindowHandle};
 use semver::Version;
+use std::error;
 use std::ffi::{CStr, CString};
 use std::fmt;
 use std::marker::Send;
@@ -416,6 +417,8 @@ impl fmt::Display for Error {
     }
 }
 
+impl error::Error for Error {}
+
 /// An error callback. This can be supplied with some user data to be passed to
 /// the callback function when it is triggered.
 pub type ErrorCallback<UserData> = Callback<fn(Error, String, &UserData), UserData>;
@@ -655,6 +658,8 @@ impl fmt::Display for InitError {
     }
 }
 
+impl error::Error for InitError {}
+
 /// Initialization hints that can be set using the `init_hint` function.
 #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
 pub enum InitHint {


Test patch: