Correctly report the cause of IO error

This was fixed in #195 but unintentionally reverted in #194.
This commit is contained in:
David Tolnay 2017-07-22 13:33:48 -07:00
parent 815c44287a
commit d44adb148e
1 changed files with 1 additions and 1 deletions

View File

@ -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,