From 4cb3884e24b3cba3347ff93475bbabd6fe18d2fa Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 22 Jul 2022 13:25:45 +0200 Subject: refactor: make factories an optional feature --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 992f276..5724f10 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(unboxed_closures, fn_traits)] +#![cfg_attr(feature = "factory", feature(unboxed_closures, fn_traits))] #![deny(clippy::all)] #![deny(clippy::pedantic)] @@ -6,12 +6,14 @@ //! //! Syrette is a collection of utilities useful for performing dependency injection. -pub mod castable_factory; pub mod di_container; pub mod errors; pub mod interfaces; pub mod ptr; +#[cfg(feature = "factory")] +pub mod castable_factory; + pub use di_container::*; pub use syrette_macros::*; -- cgit v1.2.3-18-g5258