macro_rules! soft_debug_assert_ne {
($x:expr, $y:expr) => { ... };
($x:expr, $y:expr,) => { ... };
($x:expr, $y:expr, $failed:expr) => { ... };
($x:expr, $y:expr, $failed:expr,) => { ... };
}Expand description
If debug assertions are enabled, asserts two values are not equal, returning otherwise.
Non-panicking version of debug_assert_ne.
§Custom return values
Unless otherwise specified, this will return the default value of the return type (if it has one).
A custom value can be returned instead by supplying it as an additional argument (similar to assert’s custom message),
i.e. soft_debug_assert_ne!(2 + 2, 4, Err(e)). Ownership of the value is only taken if the assertion fails, so you can
continue to use them later on.
This does not perform Err(..)-wrapping, to allow returning any value.