summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet/marker.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2020-05-12 17:07:44 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2020-06-08 14:36:13 +0200
commitc51d96b98f1ed92fe7bc6d964abb0d2a8616bae1 (patch)
tree9fb9ea374e712da619c0985b9ddc0f4377b0b749 /openpgp/src/packet/marker.rs
parent5be97d9c6ee82f068a5b38aa455f31497d3f20bf (diff)
openpgp: Introduce feature flag for quickcheck.
- Make quickcheck dependency optional. - Make quickcheck a dev-dependency for tests. - Fix doctests for - cert::ValidCert::user_attributes, - cert::builder::CertBuilder::add_user_attribute, - cert::revoke::UserAttributeRevocationBuilder - cert::revoke::UserAttributeRevocationBuilder::build. Doctests do not use cfg(test), so we cannot use quickcheck in there.
Diffstat (limited to 'openpgp/src/packet/marker.rs')
-rw-r--r--openpgp/src/packet/marker.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/packet/marker.rs b/openpgp/src/packet/marker.rs
index 8217901c..728f115b 100644
--- a/openpgp/src/packet/marker.rs
+++ b/openpgp/src/packet/marker.rs
@@ -1,3 +1,4 @@
+#[cfg(any(test, feature = "quickcheck"))]
use quickcheck::{Arbitrary, Gen};
use crate::packet;
@@ -34,6 +35,7 @@ impl From<Marker> for Packet {
}
}
+#[cfg(any(test, feature = "quickcheck"))]
impl Arbitrary for Marker {
fn arbitrary<G: Gen>(_: &mut G) -> Self {
Self::default()