diff --git a/src/upkeep.rs b/src/upkeep.rs index 63754d6..329417d 100644 --- a/src/upkeep.rs +++ b/src/upkeep.rs @@ -77,6 +77,15 @@ impl fmt::Display for Error { } } +impl std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Self::UpkeepRunning => None, + Self::FailedToSpawnUpkeepThread(e) => Some(e), + } + } +} + impl Upkeep { /// Creates a new [`Upkeep`]. ///