error: replace cause method with source

cause method for std::error::Error is depricated by rust, source method
is recommended.

Fixes: #107
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
Jianyong Wu
2023-02-01 16:38:37 +08:00
parent a45ecf0884
commit 4203075f19

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),