From d44adb148e51976d8d45a9a7971d7414ba96e37d Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 22 Jul 2017 13:33:48 -0700 Subject: [PATCH] Correctly report the cause of IO error This was fixed in #195 but unintentionally reverted in #194. --- src/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.rs b/src/internal.rs index 3baa5a6..e6b55a8 100644 --- a/src/internal.rs +++ b/src/internal.rs @@ -68,7 +68,7 @@ impl error::Error for ErrorKind { fn cause(&self) -> Option<&error::Error> { match *self { - ErrorKind::Io(ref err) => err.cause(), + ErrorKind::Io(ref err) => Some(err), ErrorKind::InvalidEncoding{..} => None, ErrorKind::SequenceMustHaveLength => None, ErrorKind::SizeLimit => None,