summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-04-02 13:59:11 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-04-02 13:59:11 +0200
commit26e4e9b64b2cefd32017f2543fcc289a3e74afa5 (patch)
treef3e060a5251f621e4b692044a5087f93cb7a2156 /openpgp
parentacd6dfcd2c971bae87fd934aa117eb0f47d9a52b (diff)
openpgp: Implement Default for packet::Literal.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/packet/literal.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/packet/literal.rs b/openpgp/src/packet/literal.rs
index b0c03bb5..bc95ba8d 100644
--- a/openpgp/src/packet/literal.rs
+++ b/openpgp/src/packet/literal.rs
@@ -73,6 +73,12 @@ impl fmt::Debug for Literal {
}
}
+impl Default for Literal {
+ fn default() -> Self {
+ Self::new(Default::default())
+ }
+}
+
impl Literal {
/// Returns a new `Literal` packet.
pub fn new(format: DataFormat) -> Literal {