summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/packet/mod.rs')
-rw-r--r--openpgp/src/packet/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs
index 3a773a3a..68058053 100644
--- a/openpgp/src/packet/mod.rs
+++ b/openpgp/src/packet/mod.rs
@@ -610,6 +610,18 @@ pub struct Common {
}
assert_send_and_sync!(Common);
+impl Common {
+ /// Returns a default version of `Common`.
+ ///
+ /// This is equivalent to using `Common::from`, but the function
+ /// is constant.
+ pub(crate) const fn new() -> Self {
+ Common {
+ dummy: std::marker::PhantomData
+ }
+ }
+}
+
#[cfg(test)]
impl Arbitrary for Common {
fn arbitrary(_: &mut Gen) -> Self {