about summary refs log tree commit diff
path: root/src/rustbook/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustbook/error.rs')
-rw-r--r--src/rustbook/error.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rustbook/error.rs b/src/rustbook/error.rs
index 1d3baef8c1c..a5915ed4d73 100644
--- a/src/rustbook/error.rs
+++ b/src/rustbook/error.rs
@@ -56,6 +56,12 @@ impl Error for String {
     }
 }
 
+impl<'a> Error for Box<Error + 'a> {
+    fn description(&self) -> &str { (**self).description() }
+    fn detail(&self) -> Option<&str> { (**self).detail() }
+    fn cause(&self) -> Option<&Error> { (**self).cause() }
+}
+
 impl FromError<()> for () {
     fn from_err(_: ()) -> () { () }
 }