mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Delegate io::Error::cause to inner error
This commit is contained in:
parent
1a3cffbddf
commit
4458b5a9d5
@ -215,6 +215,13 @@ impl error::Error for Error {
|
||||
Repr::Custom(ref c) => c.error.description(),
|
||||
}
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&Error> {
|
||||
match self.repr {
|
||||
Repr::Os(..) => None,
|
||||
Repr::Custom(ref c) => c.error.cause(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn _assert_error_is_sync_send() {
|
||||
|
Loading…
Reference in New Issue
Block a user