Closed Caellian closed 2 days ago
@Caellian thanks for catching this... cause indeed unlike #[cfg(...
, if cfg!(...
doesn't remove the code (tho it will get DCE'ed eventually), while they both still evaluate at compile time, so the code guarded here would indeed need to compile, which in this case it can't. I plead guilty!
This PR fixes compilation without chrono
Previously
cfg!(feature = "chrono")
was used which blocks execution at runtime, this was switched out with a#[cfg(feature = "chrono")]
block which will block the code at compile time. Blocking it at runtime doesn't work because prevented functions infunctions::time
don't exist so this causes a compile error.Added a minimal build to the CI to avoid these kinds of problems in future.