Loading crates/tor-dirmgr/src/event.rs +4 −8 Original line number Diff line number Diff line Loading @@ -255,15 +255,17 @@ pub struct DirBootstrapStatus { } /// The status for a single directory. #[derive(Clone, Debug)] #[derive(Clone, Debug, Default)] pub struct DirStatus(DirStatusInner); /// The contents of a single DirStatus. /// /// This is a separate type so that we don't make the variants public. #[derive(Clone, Debug)] #[derive(Clone, Debug, Educe)] #[educe(Default)] pub(crate) enum DirStatusInner { /// We don't have any information yet. #[educe(Default)] NoConsensus { /// If present, we are fetching a consensus whose valid-after time /// postdates this time. Loading Loading @@ -293,12 +295,6 @@ pub(crate) enum DirStatusInner { }, } impl Default for DirStatus { fn default() -> Self { DirStatus(DirStatusInner::NoConsensus { after: None }) } } impl From<DirStatusInner> for DirStatus { fn from(inner: DirStatusInner) -> DirStatus { DirStatus(inner) Loading Loading
crates/tor-dirmgr/src/event.rs +4 −8 Original line number Diff line number Diff line Loading @@ -255,15 +255,17 @@ pub struct DirBootstrapStatus { } /// The status for a single directory. #[derive(Clone, Debug)] #[derive(Clone, Debug, Default)] pub struct DirStatus(DirStatusInner); /// The contents of a single DirStatus. /// /// This is a separate type so that we don't make the variants public. #[derive(Clone, Debug)] #[derive(Clone, Debug, Educe)] #[educe(Default)] pub(crate) enum DirStatusInner { /// We don't have any information yet. #[educe(Default)] NoConsensus { /// If present, we are fetching a consensus whose valid-after time /// postdates this time. Loading Loading @@ -293,12 +295,6 @@ pub(crate) enum DirStatusInner { }, } impl Default for DirStatus { fn default() -> Self { DirStatus(DirStatusInner::NoConsensus { after: None }) } } impl From<DirStatusInner> for DirStatus { fn from(inner: DirStatusInner) -> DirStatus { DirStatus(inner) Loading