Closed dmarcuse closed 4 years ago
This is actually something I've been meaning to do for a while. I think it ends up being more readable without cfg-if
(although it was certainly easier for me to use cfg-if
as a novice Rust developer). And as a plus, rustfmt
can format the import blocks now. Thank you!
cfg-if
makes the code a bit more readable, but it's only used in two places. It can be easily replaced with#[cfg(...)]
, removing the only required dependency for the project and even shaving off a few lines.I realize that this is an opinionated change, and while it would be nice to have zero dependencies, the readability improvement may be worth it, especially considering that
cfg-if
is a small crate that's likely to be required by other crates anyways.