tag | 0beaf239b6c85e62dbe3df20ecad6e006b6fde17 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Apr 29 10:35:40 2024 -0700 |
object | 2d865daf5a031b358723d25c52f78576649140da |
aml_tz3_314012070 (11568888,com.google.android.tzdata3)
commit | 2d865daf5a031b358723d25c52f78576649140da | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 15 21:43:34 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 15 21:43:34 2022 +0000 |
tree | 18fc2dad0caf21a0589f5e2622ba8c4e83b6031f | |
parent | 2a1519cca3910c4efecd3c120661929a9f999eb7 [diff] | |
parent | 8d895366089df6377d66967371f86ece5197c720 [diff] |
Snap for 8730993 from 8d895366089df6377d66967371f86ece5197c720 to mainline-tzdata3-release Change-Id: I7d15a5d18ffa89657e730579b7f54e50be096e3c
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.