Correctlly report the cause of IoError (#195)

This commit is contained in:
Lena Hellström 2017-07-20 10:12:36 -07:00 committed by Ty Overby
parent e27043a036
commit b6dbb08f92
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::IoError(ref err) => err.cause(),
ErrorKind::IoError(ref err) => Some(err),
ErrorKind::InvalidEncoding{..} => None,
ErrorKind::SequenceMustHaveLength => None,
ErrorKind::SizeLimit => None,