summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-04-06 15:09:16 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-04-06 16:58:55 +0200
commit3ff9e05ed8bf568aa2629a92c7433264f7d332e9 (patch)
treee366c1ab842aca7a406ce4b4f74f6adec9fd4b1e
parent583cb3def73457d9594d518679d03fcda1464180 (diff)
openpgp: Make Signer::creation_time polymorphic.
-rw-r--r--openpgp/src/serialize/stream.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs
index 3b8a1a86..eef5512f 100644
--- a/openpgp/src/serialize/stream.rs
+++ b/openpgp/src/serialize/stream.rs
@@ -415,8 +415,10 @@ impl<'a> Signer<'a> {
///
/// Note: it is up to the caller to make sure the signing keys are
/// actually valid as of `time`.
- pub fn creation_time(mut self, creation_time: SystemTime) -> Self {
- self.creation_time = Some(creation_time);
+ pub fn creation_time<T: Into<SystemTime>>(mut self, creation_time: T)
+ -> Self
+ {
+ self.creation_time = Some(creation_time.into());
self
}