ternary_ne

Macro ternary_ne 

Source
macro_rules! ternary_ne {
    ($left:expr, $right:expr, $true_expr:expr, $false_expr:expr) => { ... };
}
Expand description

A macro for ternary conditional operation with equality comparison.

This macro compares two values and returns one of two expressions based on whether the values are equal or not.

ยงExamples

use macrors::ternary_eq;

let x = 5;
let y = 10;

let result_eq = ternary_eq!(x, y, "x is equal to y", "x is not equal to y");
assert_eq!(result_eq, "x is not equal to y");