commit | d4d5d9f2b2b1c50a9db57d2d3e5a10b7e17ab814 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Aug 07 15:38:37 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Aug 07 15:38:37 2024 +0000 |
tree | 9b80fa0574d332baba0e4ea89de6bdcba081f22f | |
parent | 72b54aed88a25bc33026e58c63930b43b6348013 [diff] | |
parent | 82f61a1b798e39f40b7790738453205be5d3c207 [diff] |
Update Android.bp by running cargo_embargo am: 82f61a1b79 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cfg-if/+/3208931 Change-Id: Ia68828a5221ac46170243f35732778e71b293b65 Signed-off-by: Automerger Merge Worker <[email protected]>
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.