cmpeq

Macro cmpeq 

Source
macro_rules! cmpeq {
    { $a:expr, $b:expr } => { ... };
    { $r:expr } => { ... };
}
Expand description

Compare, and return early if different

  • cmpeq!(d: Equality): If d is Different, returns Ok(d). (The containing scope should return Result<Equality,>.)

  • cmpeq!<T: Eq>(a: T, b: T);: compares a and b using Equality::cmpeq, and returns immediately if a != b, or the comparison failed.