Crates.io | conditional |
lib.rs | conditional |
version | 0.1.1 |
source | src |
created_at | 2019-09-22 17:18:17.811361 |
updated_at | 2019-09-22 17:57:30.297397 |
description | Provides a conditional! macro which lets you use the syntax of the conditional operator (also known as the ternary operator) in Rust |
homepage | |
repository | https://github.com/alexschrod/conditional |
max_upload_size | |
id | 166835 |
size | 3,254 |
Lets you use the syntax of the conditional operator in Rust. Also known as the ternary operator.
let x = conditional!(69 > 42 ? "hello" : "world");
assert_eq!(x, "hello");
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.