tor-dirmgr: impl AsRef<dyn Error> for Error
This allows use with tor_error::Report.
This commit is contained in:
parent
f3957a50b6
commit
9424b0970d
|
@ -1,5 +1,6 @@
|
|||
//! Declare an error type for the tor-dirmgr crate.
|
||||
|
||||
use std::error::Error as StdError;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::DocSource;
|
||||
|
@ -155,6 +156,12 @@ impl From<tor_rtcompat::scheduler::SleepError> for Error {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsRef<dyn StdError + 'static> for Error {
|
||||
fn as_ref(&self) -> &(dyn StdError + 'static) {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// The effect that a given error has on our bootstrapping process
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub(crate) enum BootstrapAction {
|
||||
|
|
Loading…
Reference in New Issue