tag | f5d47ee45ed0571f02de1d04f59f271c1f9006a7 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Aug 06 23:14:23 2024 -0700 |
object | 40cfd6ae1e4d4496c28ba35907a3f59e7522a2cb |
Android VTS 13.0 Release 9 (12048282)
commit | 40cfd6ae1e4d4496c28ba35907a3f59e7522a2cb | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Mar 16 01:04:55 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Mar 16 01:04:55 2022 +0000 |
tree | 922148d864e3db4510c9ac0118a0c1a4a95056de | |
parent | 62cac580e50c96f78bd32ccdb4974adec0c0f901 [diff] | |
parent | a003185aa2b00004df5b9136ecb091544eeee7b7 [diff] |
Snap for 8303774 from a003185aa2b00004df5b9136ecb091544eeee7b7 to tm-release Change-Id: I048de03ae2aff6c17864b2a6ff69d9f0ee4a4029
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.