Macro assertables::assume_ne [−][src]
Assume two values are not equal.
-
When true, return
Ok(true)
. -
When false, return
Err
with a message and the values of the expressions with their debug representations.
Example
let x = assume_ne!(1, 2); //-> Ok(true)
let x = assume_ne!(1, 1); //-> Err("assume_ne left:1 right:1")
This macro has a second form where a custom message can be provided.