tag | 3bd6e1deea1676414cbbb0b5416b5e9cd66138fe | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Nov 01 17:06:49 2023 -0700 |
object | 8239714c79af62c76e8bdce0da7126dfb0d3de44 |
frc_340819190 (10894928,com.google.android.healthfitness)
commit | 8239714c79af62c76e8bdce0da7126dfb0d3de44 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 11 17:57:48 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 11 17:57:48 2023 +0000 |
tree | 9057ef9f4fc908466cb4b084ec40777c9fd31fe8 | |
parent | ee04c4be9bcf7a33ae46ea844284472d4ed82d77 [diff] | |
parent | cc1d5f99cf8479bdff33edb72bfb51f1df775663 [diff] |
Snap for 9912757 from cc1d5f99cf8479bdff33edb72bfb51f1df775663 to aml-frc-release Change-Id: Ic96ac7d3f214cefd6eda10352a5d2171c3923725
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"
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(); }
This project is licensed under either of
at your option.
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.