Merge pull request #108 from jongwu/error_cause

error: replace cause method with source
This commit is contained in:
Chao Wu
2023-02-05 23:05:04 +08:00
committed by GitHub

View File

@@ -85,7 +85,7 @@ impl fmt::Display for Error {
}
impl StdError for Error {
fn cause(&self) -> Option<&dyn StdError> {
fn source(&self) -> Option<&(dyn StdError + 'static)> {
#[allow(clippy::manual_map)]
match self.cause {
Some(ref x) => Some(&**x),