Put test utilities behind a feature flag.
[rust-lightning] / lightning / src / util / mod.rs
index 84c8e6c14daa841c2d01772b3cbe15f69bbe0ea7..a3cfaa9804e6e9f58c3521e6ab2d07c3862fd0b6 100644 (file)
@@ -32,10 +32,10 @@ pub(crate) mod macro_logger;
 pub mod logger;
 pub mod config;
 
-#[cfg(test)]
-pub(crate) mod test_utils;
+#[cfg(any(test, feature = "_test_utils"))]
+pub mod test_utils;
 
 /// impls of traits that add exra enforcement on the way they're called. Useful for detecting state
 /// machine errors and used in fuzz targets and tests.
-#[cfg(any(test, feature = "fuzztarget"))]
+#[cfg(any(test, feature = "fuzztarget", feature = "_test_utils"))]
 pub mod enforcing_trait_impls;