A simple ternary operator macro in rust. the iff! macro is the only item exported by this crate, it simply takes three expressions, seperated by ? and :, and expands them info an if else statement.
Usage
iff!;
expands to:
if condition else
It can also be used in assignment:
let value = iff!;
It can also be used inline:
let value = iff!;
It may also be nested, although the code starts to look less clean at this point
let value = iff!;
Currently using the ? operator within iff is not possible, as there is no way (that I know of) to check for whitespace. This should be changeable once Tracking issue 54725 becomes stable.