summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-03-31 16:38:08 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-03-31 18:26:02 +0200
commit47e8417bd4d1c75a6e241be052920589d7cd2f8a (patch)
tree7c17b3e27bae3e995db3542a07f3d4d4d7c6b8ef /openpgp
parent73dd16dbb28bb5c55d1fbdf6c6ef57dbe93a7de6 (diff)
openpgp: Implement Arbitrary for packet::Common.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/packet/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs
index 2333e393..af911578 100644
--- a/openpgp/src/packet/mod.rs
+++ b/openpgp/src/packet/mod.rs
@@ -7,6 +7,7 @@
use std::fmt;
use std::ops::{Deref, DerefMut};
use std::slice;
+use quickcheck::{Arbitrary, Gen};
use crate::Error;
use crate::Result;
@@ -248,6 +249,13 @@ pub struct Common {
dummy: std::marker::PhantomData<()>,
}
+impl Arbitrary for Common {
+ fn arbitrary<G: Gen>(_: &mut G) -> Self {
+ // XXX: Change if this gets interesting fields.
+ Common::default()
+ }
+}
+
impl Default for Common {
fn default() -> Common {
Common {