conditional

Crates.ioconditional
lib.rsconditional
version0.1.1
created_at2019-09-22 17:18:17.811361+00
updated_at2019-09-22 17:57:30.297397+00
descriptionProvides a conditional! macro which lets you use the syntax of the conditional operator (also known as the ternary operator) in Rust
homepage
repositoryhttps://github.com/alexschrod/conditional
max_upload_size
id166835
size3,254
Alexander Krivács Schrøder (ilyvion)

documentation

README

conditional

Crates.io Crates.io Crates.io Docs.io

Lets you use the syntax of the conditional operator in Rust. Also known as the ternary operator.

Examples

let x = conditional!(69 > 42 ? "hello" : "world");
assert_eq!(x, "hello");

License

Licensed under either of

at your option.

Contribution

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.

Commit count: 0

cargo fmt