diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-04-03 16:47:02 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-04-03 17:00:40 +0200 |
commit | 6494b37775ada713e8ff139ee40c5accdfcaf16a (patch) | |
tree | a8b0c95231d6b810bbe285cac6f9105f19a9b4b9 /openpgp/src/serialize/stream.rs | |
parent | 172e5df6a343402042c613b1024739e700756014 (diff) |
openpgp: Make LiteralWriter::date polymorphic.
Diffstat (limited to 'openpgp/src/serialize/stream.rs')
-rw-r--r-- | openpgp/src/serialize/stream.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/serialize/stream.rs b/openpgp/src/serialize/stream.rs index 2196f9d7..37cd17df 100644 --- a/openpgp/src/serialize/stream.rs +++ b/openpgp/src/serialize/stream.rs @@ -622,9 +622,9 @@ impl<'a> LiteralWriter<'a> { } /// Sets the data format. - pub fn date(mut self, timestamp: SystemTime) -> Result<Self> + pub fn date<T: Into<SystemTime>>(mut self, timestamp: T) -> Result<Self> { - self.template.set_date(Some(timestamp))?; + self.template.set_date(Some(timestamp.into()))?; Ok(self) } |