From c51d96b98f1ed92fe7bc6d964abb0d2a8616bae1 Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Tue, 12 May 2020 17:07:44 +0200 Subject: 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. --- openpgp/src/packet/marker.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openpgp/src/packet/marker.rs') 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 for Packet { } } +#[cfg(any(test, feature = "quickcheck"))] impl Arbitrary for Marker { fn arbitrary(_: &mut G) -> Self { Self::default() -- cgit v1.2.3