Skip to content

Commit

Permalink
export the strict assert macros uniformly
Browse files Browse the repository at this point in the history
  • Loading branch information
i509VCB authored and cwfitzgerald committed Nov 1, 2022
1 parent 085e411 commit 32febc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wgpu-core/src/assertions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@
//! in both debug and release builds.
#[cfg(feature = "strict_asserts")]
#[macro_export]
macro_rules! strict_assert {
( $( $arg:tt )* ) => {
assert!( $( $arg )* )
}
}

#[cfg(feature = "strict_asserts")]
#[macro_export]
macro_rules! strict_assert_eq {
( $( $arg:tt )* ) => {
assert_eq!( $( $arg )* )
}
}

#[cfg(feature = "strict_asserts")]
#[macro_export]
macro_rules! strict_assert_ne {
( $( $arg:tt )* ) => {
assert_ne!( $( $arg )* )
Expand All @@ -41,13 +44,15 @@ macro_rules! strict_assert {
}

#[cfg(not(feature = "strict_asserts"))]
#[macro_export]
macro_rules! strict_assert_eq {
( $( $arg:tt )* ) => {
debug_assert_eq!( $( $arg )* )
};
}

#[cfg(not(feature = "strict_asserts"))]
#[macro_export]
macro_rules! strict_assert_ne {
( $( $arg:tt )* ) => {
debug_assert_ne!( $( $arg )* )
Expand Down

0 comments on commit 32febc5

Please sign in to comment.