Bug: 154052335

Clone this repo:
  1. 3a0379a Adding bluetooth apex by Roopa Sattiraju · 4 weeks ago master
  2. ffca661 Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." by Joel Galenson · 5 weeks ago
  3. e107b58 Refresh Android.bp, cargo2android.json, TEST_MAPPING. by Joel Galenson · 7 weeks ago
  4. 2ce5eb7 Merge "Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918" into stage-aosp-master by TreeHugger Robot · 9 weeks ago
  5. 70aca29 Make vendor available. am: 35d3f2c663 by Janis Danisevskis · 9 weeks 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.