assert_ne

Macro assert_ne 

Source
macro_rules! assert_ne {
    ($left:expr, $right:expr) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}
Expand description

Asserts that two expressions are not equal.

If the assertion fails, a trace message is emitted with the values of both expressions, and then the program panics.

ยงExamples

// This will pass
assert_ne!(1, 2);

// This would fail and emit a trace message
// assert_ne!(1, 1);