We could implement it now already with a nightly feature and duplicate all constructors and conditionally compile them with #[cfg(feature = "nightly")]. But unless there is significant demand we could just wait and hope it reaches stable in a few versions.
This would improve the usability of this crate a lot. One of the most common ways I define IP networks in my code is global constants, which I currently have to use lazy_static! or similar to achieve.
We can now/soon have
const fn
constructors thanks toif
statements now working inconst
on nightly: https://blog.rust-lang.org/inside-rust/2019/11/25/const-if-match.htmlWe could implement it now already with a
nightly
feature and duplicate all constructors and conditionally compile them with#[cfg(feature = "nightly")]
. But unless there is significant demand we could just wait and hope it reaches stable in a few versions.This would improve the usability of this crate a lot. One of the most common ways I define IP networks in my code is global constants, which I currently have to use
lazy_static!
or similar to achieve.