Skip to content

Commit

Permalink
impl std Error for upkeep Error (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedbyron authored Jun 29, 2022
1 parent e803758 commit 1595464
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/upkeep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
///
Expand Down

2 comments on commit 1595464

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bench-ubuntu-latest

Benchmark suite Current: 1595464 Previous: 76a3629 Ratio
stdlib/instant_now 27 ns/iter (± 0) 26 ns/iter (± 0) 1.04
stdlib/instant_delta 60 ns/iter (± 0) 58 ns/iter (± 0) 1.03
quanta/quanta_now 27 ns/iter (± 0) 27 ns/iter (± 1) 1
quanta/quanta_now_delta 59 ns/iter (± 0) 56 ns/iter (± 0) 1.05
quanta/quanta_instant_now 31 ns/iter (± 0) 31 ns/iter (± 0) 1
quanta/quanta_raw 26 ns/iter (± 0) 27 ns/iter (± 0) 0.96
quanta/quanta_raw_scaled 27 ns/iter (± 0) 27 ns/iter (± 0) 1
quanta/quanta_raw_delta 57 ns/iter (± 0) 56 ns/iter (± 0) 1.02
quanta/quanta_recent 2 ns/iter (± 0) 2 ns/iter (± 0) 1
quanta/quanta_instant_recent 1 ns/iter (± 0) 1 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'bench-ubuntu-latest'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 0.1.

Benchmark suite Current: 1595464 Previous: 76a3629 Ratio
stdlib/instant_now 27 ns/iter (± 0) 26 ns/iter (± 0) 1.04
stdlib/instant_delta 60 ns/iter (± 0) 58 ns/iter (± 0) 1.03
quanta/quanta_now 27 ns/iter (± 0) 27 ns/iter (± 1) 1
quanta/quanta_now_delta 59 ns/iter (± 0) 56 ns/iter (± 0) 1.05
quanta/quanta_instant_now 31 ns/iter (± 0) 31 ns/iter (± 0) 1
quanta/quanta_raw 26 ns/iter (± 0) 27 ns/iter (± 0) 0.96
quanta/quanta_raw_scaled 27 ns/iter (± 0) 27 ns/iter (± 0) 1
quanta/quanta_raw_delta 57 ns/iter (± 0) 56 ns/iter (± 0) 1.02
quanta/quanta_recent 2 ns/iter (± 0) 2 ns/iter (± 0) 1
quanta/quanta_instant_recent 1 ns/iter (± 0) 1 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

CC: @tobz

Please sign in to comment.