Bug: 154052335

Clone this repo:
  1. 996ae9d Update TEST_MAPPING by Jeff Vander Stoep · 9 days ago master
  2. 9e62687 Update TEST_MAPPING by David Brazdil · 2 weeks ago
  3. 131f8b0 Open library to be added to any apex am: 57bc103bc9 am: 53fda8e320 am: 9cb526f389 am: bbc82691eb by Vikram Gaur · 5 months ago main-16k-with-phones
  4. bbc8269 Open library to be added to any apex am: 57bc103bc9 am: 53fda8e320 am: 9cb526f389 by Vikram Gaur · 5 months ago
  5. 9cb526f Open library to be added to any apex am: 57bc103bc9 am: 53fda8e320 by Vikram Gaur · 5 months ago

cfg-if

Documentation

A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted.

[dependencies]
cfg-if = "0.1"

Example

cfg_if::cfg_if! {
    if #[cfg(unix)] {
        fn foo() { /* unix specific functionality */ }
    } else if #[cfg(target_pointer_width = "32")] {
        fn foo() { /* non-unix, 32-bit functionality */ }
    } else {
        fn foo() { /* fallback implementation */ }
    }
}

fn main() {
    foo();
}

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cfg-if by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.