From b6dbb08f920821c85a42a91d3bf61c4c144ad79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lena=20Hellstr=C3=B6m?= Date: Thu, 20 Jul 2017 10:12:36 -0700 Subject: [PATCH] Correctlly report the cause of IoError (#195) --- src/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.rs b/src/internal.rs index d8aa74e..140af99 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::IoError(ref err) => err.cause(), + ErrorKind::IoError(ref err) => Some(err), ErrorKind::InvalidEncoding{..} => None, ErrorKind::SequenceMustHaveLength => None, ErrorKind::SizeLimit => None,