tag | ece1d509fc3b40ada8fec14924a9e53a8649b3e6 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue May 16 21:53:01 2023 -0700 |
object | a9bc1ac8722b0ce42b461deb84b5f4195c3c9341 |
Platform Tools Release 34.0.3 (9979309)
commit | a9bc1ac8722b0ce42b461deb84b5f4195c3c9341 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 20 16:05:11 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 20 16:05:11 2023 +0000 |
tree | 9057ef9f4fc908466cb4b084ec40777c9fd31fe8 | |
parent | 262081346471fa4ba33cccb985524fde85e93670 [diff] | |
parent | 6370d7a0025c7ae60eb5b427fc4d10a3c72e04bb [diff] |
Snap for 9979206 from 6370d7a0025c7ae60eb5b427fc4d10a3c72e04bb to sdk-release Change-Id: I31fb38429720a5ce54942ea2c64a11a0e9bb4ea9
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.