-
Notifications
You must be signed in to change notification settings - Fork 598
Simplification of Conditional Compilation Attributes #1776
Copy link
Copy link
Open
Description
There are instances where there is room for code improvement.
The below two examples are in their original form very difficult to understand and one must check twice to know what they actually mean.
Example 1
Original
#[cfg(all(
target_arch = "wasm32",
feature = "wasmbind",
not(any(target_os = "emscripten", target_os = "wasi", target_os = "linux"))
))]Simplified
#[cfg(all(
target_arch = "wasm32",
feature = "wasmbind",
not(target_os = "emscripten"),
not(target_os = "wasi"),
not(target_os = "linux"),
))]Example 2
Original
#[cfg(all(
feature = "now",
not(all(
target_arch = "wasm32",
feature = "wasmbind",
not(any(target_os = "emscripten", target_os = "wasi", target_os = "linux"))
))
))] Simplified
#[cfg(all(
feature = "now",
any(
not(target_arch = "wasm32"),
not(feature = "wasmbind"),
target_os = "emscripten",
target_os = "wasi",
target_os = "linux",
)
))]If you agree with this change, but don't have resources to implement it, then I will be happy to make those changes and submit a pr.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels