mirror of https://git.sr.ht/~stygianentity/bincode
Correctly report the cause of IO error
This was fixed in #195 but unintentionally reverted in #194.
This commit is contained in:
parent
815c44287a
commit
d44adb148e
|
|
@ -68,7 +68,7 @@ impl error::Error for ErrorKind {
|
||||||
|
|
||||||
fn cause(&self) -> Option<&error::Error> {
|
fn cause(&self) -> Option<&error::Error> {
|
||||||
match *self {
|
match *self {
|
||||||
ErrorKind::Io(ref err) => err.cause(),
|
ErrorKind::Io(ref err) => Some(err),
|
||||||
ErrorKind::InvalidEncoding{..} => None,
|
ErrorKind::InvalidEncoding{..} => None,
|
||||||
ErrorKind::SequenceMustHaveLength => None,
|
ErrorKind::SequenceMustHaveLength => None,
|
||||||
ErrorKind::SizeLimit => None,
|
ErrorKind::SizeLimit => None,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue