mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-05-01 00:31:09 +00:00
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:
parent
1c9108610d
commit
9baf47963d
1 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,11 @@ pub use std::time::{Instant, SystemTime};
|
||||||
#[cfg(feature = "unsafe_use_mock_instant_for_testing")]
|
#[cfg(feature = "unsafe_use_mock_instant_for_testing")]
|
||||||
pub use mock_instant::thread_local::{Instant, SystemTime};
|
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)]
|
#[derive(Debug)]
|
||||||
pub struct ExpiringSet<T> {
|
pub struct ExpiringSet<T> {
|
||||||
set: HashSet<T>,
|
set: HashSet<T>,
|
||||||
|
|
Loading…
Add table
Reference in a new issue