summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-04-03 16:47:02 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-04-03 17:00:40 +0200
commit6494b37775ada713e8ff139ee40c5accdfcaf16a (patch)
treea8b0c95231d6b810bbe285cac6f9105f19a9b4b9
parent172e5df6a343402042c613b1024739e700756014 (diff)
openpgp: Make LiteralWriter::date polymorphic.
-rw-r--r--openpgp/src/serialize/stream.rs4
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)
}