summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-03-18 09:52:24 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-03-18 09:54:58 +0100
commita83045c43ab0c6f943075baa0145a937feef8c28 (patch)
tree5101a252c28027074603e836770466644b9c562f
parent59ebcd7cb62ac21ccb3e9981e79cdfb8f36c1d5d (diff)
openpgp: Change cert::Builder::set_creation_time to take an Option.
-rw-r--r--openpgp/src/cert/builder.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs
index dd38c82f..aac45a50 100644
--- a/openpgp/src/cert/builder.rs
+++ b/openpgp/src/cert/builder.rs
@@ -180,10 +180,13 @@ impl CertBuilder {
}
/// Sets the creation time.
+ ///
+ /// If `creation_time` is `None`, this causes the `Builder` to use
+ /// the time when `Builder::generate` is called.
pub fn set_creation_time<T>(mut self, creation_time: T) -> Self
- where T: Into<std::time::SystemTime>,
+ where T: Into<Option<std::time::SystemTime>>,
{
- self.creation_time = Some(creation_time.into());
+ self.creation_time = creation_time.into();
self
}