Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug versions of assert_relative_eq! and friends #24

Open
michael-p opened this issue Jan 6, 2018 · 0 comments
Open

Add debug versions of assert_relative_eq! and friends #24

michael-p opened this issue Jan 6, 2018 · 0 comments

Comments

@michael-p
Copy link

It would be great to have debug_assert_{relative|ne}_{eq|ne} macros that are only checked in non optimized builds, similar to debug_assert! from the standard library.

Implementation should be straightforward, something like:

macro_rules! debug_assert_relative_eq {
    ($($arg:tt)*) => (if cfg!(debug_assertions) { assert_relative_eq!($($arg)*); })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant