From 21c672bf6eb8c4e254f8613a222ee4bd4fef0fe6 Mon Sep 17 00:00:00 2001 From: msedzins Date: Tue, 17 Sep 2024 22:15:49 +0200 Subject: [PATCH] Excluded examples in lib.rs when hazmat feature not enabled --- dsa/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dsa/src/lib.rs b/dsa/src/lib.rs index 00d41bdb..727613b7 100644 --- a/dsa/src/lib.rs +++ b/dsa/src/lib.rs @@ -12,7 +12,8 @@ //! //! Generate a DSA keypair //! -//! ``` +#![cfg_attr(feature = "hazmat", doc = "```")] +#![cfg_attr(not(feature = "hazmat"), doc = "```ignore")] //! # use dsa::{KeySize, Components, SigningKey}; //! let mut csprng = rand::thread_rng(); //! let components = Components::generate(&mut csprng, KeySize::DSA_2048_256); @@ -22,7 +23,8 @@ //! //! Create keypair from existing components //! -//! ``` +#![cfg_attr(feature = "hazmat", doc = "```")] +#![cfg_attr(not(feature = "hazmat"), doc = "```ignore")] //! # use dsa::{Components, SigningKey, VerifyingKey}; //! # use num_bigint::BigUint; //! # use num_traits::One;