tag | 27a2290083a254a96bc8cb87c3bd6e076e1f3f52 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Nov 04 12:14:34 2020 -0800 |
object | dbd3700cfd93346a135cbf64c9e53c031b90a7c8 |
Platform Tools Release 30.0.5 (6877874)
commit | dbd3700cfd93346a135cbf64c9e53c031b90a7c8 | [log] [tgz] |
---|---|---|
author | android-build-prod (mdb) <android-build-team-robot@google.com> | Thu Oct 01 20:28:30 2020 +0000 |
committer | android-build-prod (mdb) <android-build-team-robot@google.com> | Thu Oct 01 20:28:30 2020 +0000 |
tree | 9f53b461009a2611d3ee163fd22cd03401f946fa | |
parent | 4e2bbda5d7134e2f90ee76fc9afef27702b89b6c [diff] | |
parent | f5549b90452b007bd66f7f83e255ac8e9253e3f6 [diff] |
Snap for 6877830 from f5549b90452b007bd66f7f83e255ac8e9253e3f6 to sdk-release Change-Id: I50d633f826c1dfd310b08b3053e4c3521d174c40
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.