feat(blahd): fail on test features + release build

This is a best-effort check for accidental misuse of testing-only
features on release build.
This commit is contained in:
oxalica 2024-10-14 19:08:50 -04:00
parent 1c9108610d
commit 9baf47963d

View file

@ -8,6 +8,11 @@ pub use std::time::{Instant, SystemTime};
#[cfg(feature = "unsafe_use_mock_instant_for_testing")]
pub use mock_instant::thread_local::{Instant, SystemTime};
#[cfg(all(feature = "unsafe_use_mock_instant_for_testing", not(debug_assertions)))]
compile_error!(
"`unsafe_use_mock_instant_for_testing` feature must not be enabled in release build",
);
#[derive(Debug)]
pub struct ExpiringSet<T> {
set: HashSet<T>,