From 4efd0e97e9dca455ad2511398ae5e3076a76fd41 Mon Sep 17 00:00:00 2001 From: d-k-bo <47948262+d-k-bo@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:33:54 +0200 Subject: [PATCH] Replace `Error::cause` with `Error::source` --- CHANGELOG.md | 4 ++++ src/error.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02bc165..f18f3a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Replace `Error::cause` with `Error::source` + ## [0.1.1] - 2023-10-04 ### Fixed diff --git a/src/error.rs b/src/error.rs index 67ab208..ffe43dc 100644 --- a/src/error.rs +++ b/src/error.rs @@ -24,7 +24,7 @@ impl Display for Error { } } impl std::error::Error for Error { - fn cause(&self) -> Option<&dyn std::error::Error> { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { Error::Reqwest(e) => Some(e), Error::EmptyResponse => None,