From 029ca6aba9597d6e6ab860c48e065515366b8ee7 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 20 Jan 2019 15:25:41 -0500 Subject: [PATCH] Don't have doctests depend on debug_assertions --- src/lib.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6cb6f90..cc88ad4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,9 +27,7 @@ //! # // Because `debug_assertions` are on for doctests in release mode //! # // we have to add an extra guard. //! # if qadapt::is_active() { -//! if cfg!(debug_assertions) { -//! assert!(qadapt::is_active()); -//! } +//! assert!(qadapt::is_active()); //! # } //! } //! ``` @@ -118,9 +116,7 @@ static INTERNAL_ALLOCATION: RwLock = RwLock::new(usize::max_value()); /// /// fn main() { /// # if qadapt::is_active() { -/// if cfg!(debug_assertions) { -/// assert!(qadapt::is_active()); -/// } +/// assert!(qadapt::is_active()); /// # } /// } /// ``` @@ -324,9 +320,7 @@ pub fn protection_level() -> usize { /// /// pub fn main() { /// # if qadapt::is_active() { -/// if cfg!(debug_assertions) { -/// assert!(is_active()); -/// } +/// assert!(is_active()); /// # } /// } /// ```