Skip to content

Commit

Permalink
Vical builder WIP: next_update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-pronin committed Dec 17, 2024
1 parent 36083a4 commit 95a7cef
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/definitions/namespaces/org_iso_18013_5_1_vical/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct VicalBuilder {
date: String,
certificate_infos: Vec<CertificateInfo>,
vical_issue_id: Option<u32>,
next_update: Option<TDate>,
next_update: Option<String>,
extensions: Option<Extensions>,
}

Expand All @@ -58,8 +58,8 @@ impl VicalBuilder {
self.vical_issue_id = Some(vical_issue_id);
self
}
pub fn next_update(mut self, next_update: Option<TDate>) -> Self {
self.next_update = next_update;
pub fn next_update(mut self, next_update: String) -> Self {
self.next_update = next_update.into();
self
}
pub fn certificate_infos(mut self, certificate_infos: Vec<CertificateInfo>) -> Self {
Expand All @@ -76,9 +76,11 @@ impl VicalBuilder {
vical_provider: Latin1::from_str(self.vical_provider.as_str()).unwrap(),
date: TDate::from_str(self.date.as_str()).unwrap(),
vical_issue_id: self.vical_issue_id,
next_update: self.next_update,
certificate_infos: CertificateInfos::new(self.certificate_infos),
extensions: self.extensions,
next_update: match self.next_update {
Some(s) => Some(TDate::from_str(s.as_str()).unwrap()),
None => None,},
}
}
}
Expand Down

0 comments on commit 95a7cef

Please sign in to comment.