cond-1.0.2 has been yanked.
cond
Rust macro to use a match-like syntax as a elegant alternative to nesting if-else statement.
I got the idea from Go's empty switch statements. I thought it could be cool if it was in rust so I asked if that was possible in rust's discord server. They told me it wasn't unless you used a pretty ugly syntax in a match, and Esper89 (github in credits) made a macro for it. I added some tests and documentation and here's my first rust crate.
example:
use cond;
usage
You can just add the crate with
Or just add the 4 line macro in your project:
credits
Credits to github.com/Esper89 for essentially making the whole macro in the Rust discord server.