diff options
author | HampusM <hampus@hampusmat.com> | 2022-07-22 13:25:45 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-07-22 13:25:45 +0200 |
commit | 4cb3884e24b3cba3347ff93475bbabd6fe18d2fa (patch) | |
tree | 2fa5e6d81de9dc39bd11d64797914e5d305d98e2 /src/lib.rs | |
parent | 157f38bc2287dcb9a8b21ef3d5e33c569dc5136e (diff) |
refactor: make factories an optional feature
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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::*; |