commit | 72b54aed88a25bc33026e58c63930b43b6348013 | [log] [tgz] |
---|---|---|
author | Wei Li <[email protected]> | Thu Aug 01 05:41:36 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Aug 01 05:41:36 2024 +0000 |
tree | 6099d062205a882353800fc9ae4f68257b717038 | |
parent | 5844618d243b032bf12821d9b8e0f6c2ef67b3e9 [diff] | |
parent | 82a8ef8a426aeb53f24f81ddd46e9363b66dab1b [diff] |
Cleanup license metadata in external/rust/crates/cfg-if. am: 82a8ef8a42 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cfg-if/+/3202199 Change-Id: I787c1a70a370e2fa9295fdbda143ddf5ca2b2f00 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.