[−][src]Macro macro_utils::tern_python
You miss Python-like ternary conditions? Why not having them in Rust then?
let y = 4; let x = tern_python! { { "it's even" } if (y & 1 == 0) else { "it's odd" } }; println!("{} is {}", y, x);
You miss Python-like ternary conditions? Why not having them in Rust then?
let y = 4; let x = tern_python! { { "it's even" } if (y & 1 == 0) else { "it's odd" } }; println!("{} is {}", y, x);