tag | e64fe96400cf0eed38bb541d8defdeb2a25eb840 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu May 19 15:58:51 2022 -0700 |
object | c1b84b34fa01c0c2d2f9c664b199a6c76a36af75 |
Platform Tools Release 32.0.0 (8006631)
commit | c1b84b34fa01c0c2d2f9c664b199a6c76a36af75 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 00:03:40 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Dec 16 00:03:40 2021 +0000 |
tree | 7b8f5b852d30ec375578539f37f9eb05ecd3ff91 | |
parent | f227c91854ad0542e4212dc9370ce408482c8bd4 [diff] | |
parent | ffca6617a5d60308172b15580455ab80f89f05b9 [diff] |
Snap for 8005954 from ffca6617a5d60308172b15580455ab80f89f05b9 to sdk-release Change-Id: Ie8e270d99bdc95c23a160abe5341cc92af509266
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.