Skip to content

Commit 1595464

Browse files
authored
impl std Error for upkeep Error (#68)
1 parent e803758 commit 1595464

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/upkeep.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ impl fmt::Display for Error {
7777
}
7878
}
7979

80+
impl std::error::Error for Error {
81+
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
82+
match self {
83+
Self::UpkeepRunning => None,
84+
Self::FailedToSpawnUpkeepThread(e) => Some(e),
85+
}
86+
}
87+
}
88+
8089
impl Upkeep {
8190
/// Creates a new [`Upkeep`].
8291
///

0 commit comments

Comments
 (0)