Don't have doctests depend on debug_assertions

no_panic_unused
Bradlee Speice 2019-01-20 15:25:41 -05:00
parent 8df83a56b1
commit 029ca6aba9
1 changed files with 3 additions and 9 deletions

View File

@ -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<usize> = 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());
/// # }
/// }
/// ```