tag | bdb4f2bc86423c6b4ab3b5bbfcafd5cefcfd57b8 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Aug 06 23:15:58 2024 -0700 |
object | 0b33ef4efc3b504ec65c2269d742c4b0e1981a1c |
Android VTS 12.1 Release 11 (12048281)
commit | 0b33ef4efc3b504ec65c2269d742c4b0e1981a1c | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Sat May 15 03:05:53 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Sat May 15 03:05:53 2021 +0000 |
tree | 18fc2dad0caf21a0589f5e2622ba8c4e83b6031f | |
parent | f64fccb5a4c53928de660835192ea05ee74cccec [diff] | |
parent | d1d9cc2aa7ef3d686ee88a0adaefb0b621b17277 [diff] |
Snap for 7362794 from d1d9cc2aa7ef3d686ee88a0adaefb0b621b17277 to sc-v2-release Change-Id: Ia143a9aac0c1220e03f7cedcf6bd8c104acd5cfe
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.