commit | 0f2363842e7133c2377ce6372c5d4a1654e515d9 | [log] [tgz] |
---|---|---|
author | William Escande <wescande@google.com> | Mon Aug 22 20:38:15 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Aug 22 20:38:15 2022 +0000 |
tree | f1af6c3fef1dd867d0424ffdc0f4763a0a3a1baf | |
parent | f022aa62e0515b930753da1fbe2d6400cfc841d9 [diff] | |
parent | 3bcbb81b5b53a1866e92c0e41d7de9a09f5ead95 [diff] |
[Bluetooth apex] Use new apex name am: 3bcbb81b5b Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cfg-if/+/2192092 Change-Id: I8ea6ba22415f01bc2ca61fc609f9756c3cd50a89 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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.