Use std::error::Error::source; cause was deprecated in Rust 1.33.

This commit is contained in:
KAMADA Ken'ichi 2019-10-21 23:30:46 +09:00
parent 766822c791
commit 23c2c189da
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ impl error::Error for Error {
}
}
fn cause(&self) -> Option<&error::Error> {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
match *self {
Error::InvalidFormat(_) => None,
Error::Io(ref err) => Some(err),