Re:Rust Survey 2021 Results
by chrismorgan on Friday February 18, 2022 @08:18AM
(#30385314)
The Rust solution for your arch variation specifically is hardly onerous, and does just the same, ignoring the code in not-matching branches:
(If you got to much more complex cfg branches, cfg-if could be worthwhile, which lets you write `cfg_if! { if #[cfg(…)] { … } else if #[cfg(…)] { … } else { … } }`. But for only a few simple ones, I prefer to keep it out.)
[ Parent
| on HN ]
There are no comments on this comment yet.