macro_rules! cmpeq {
{ $a:expr, $b:expr } => { ... };
{ $r:expr } => { ... };
}Expand description
Compare, and return early if different
-
cmpeq!(d: Equality): IfdisDifferent, returnsOk(d). (The containing scope should returnResult<Equality,>.) -
cmpeq!<T: Eq>(a: T, b: T);: comparesaandbusingEquality::cmpeq, and returns immediately ifa != b, or the comparison failed.