tag | 17386ea75abbff5ef29dc36b6d2d5f54b7a4fcb3 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Aug 06 21:55:06 2024 -0700 |
object | 3e0bc2379ca4d4ee9777aac6cbe37fc4aa183188 |
Android CTS 14.0 Release 5 (12186525)
commit | 3e0bc2379ca4d4ee9777aac6cbe37fc4aa183188 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Mar 10 02:19:20 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Mar 10 02:19:20 2023 +0000 |
tree | 9057ef9f4fc908466cb4b084ec40777c9fd31fe8 | |
parent | 11ee06c53a48a9c48c6bf30c0da488111deb7875 [diff] | |
parent | 443be155c406c1f0c4e8e801e135f3f3156bc747 [diff] |
Snap for 9719949 from 443be155c406c1f0c4e8e801e135f3f3156bc747 to udc-release Change-Id: I074cada3b32a05837df1e0db08b048afb794f05b
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.