impl_standard_builder: Use for tor_dirmgr::DownloadScheduleConfig

This commit is contained in:
Ian Jackson 2022-06-16 14:50:50 +01:00
parent 2ab5c0861e
commit 8b724d40f8
1 changed files with 1 additions and 14 deletions

View File

@ -129,20 +129,7 @@ pub struct DownloadScheduleConfig {
pub(crate) retry_microdescs: DownloadSchedule,
}
impl Default for DownloadScheduleConfig {
fn default() -> Self {
Self::builder()
.build()
.expect("default builder setting didn't work")
}
}
impl DownloadScheduleConfig {
/// Return a new builder to make a [`DownloadScheduleConfig`]
pub fn builder() -> DownloadScheduleConfigBuilder {
DownloadScheduleConfigBuilder::default()
}
}
impl_standard_builder! { DownloadScheduleConfig }
/// Configuration for how much clock skew to tolerate in our directory information
#[derive(Debug, Clone, Builder, Eq, PartialEq)]