tag | c71d27037a06aa7a2815e455af3682755118fa1f | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Jan 30 14:48:22 2024 -0800 |
object | 32b5eba65c83993e955ec0ea598eaeb79dd23127 |
Platform Tools Release 34.0.5 (10900879)
commit | 32b5eba65c83993e955ec0ea598eaeb79dd23127 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 28 13:31:07 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 28 13:31:07 2023 +0000 |
tree | 9057ef9f4fc908466cb4b084ec40777c9fd31fe8 | |
parent | a9bc1ac8722b0ce42b461deb84b5f4195c3c9341 [diff] | |
parent | 3a308fd77901411c7ed5161012cebeb2cf8dab1a [diff] |
Snap for 10399941 from 3a308fd77901411c7ed5161012cebeb2cf8dab1a to sdk-release Change-Id: Icaa37f2060c2cc4bb5b9060e03c82c90b2e95bd5
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.