diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-06 15:09:16 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-06 16:58:55 +0200 |
commit | 3ff9e05ed8bf568aa2629a92c7433264f7d332e9 (patch) | |
tree | e366c1ab842aca7a406ce4b4f74f6adec9fd4b1e /openpgp/src/serialize/stream.rs | |
parent | 583cb3def73457d9594d518679d03fcda1464180 (diff) |
openpgp: Make Signer::creation_time polymorphic.
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r-- | openpgp/src/serialize/stream.rs | 6 |
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 } |