From d4078c84a83d121a4e3492955359cedb3b404476 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 25 Aug 2022 20:46:14 +0200 Subject: refactor!: limit FactoryPtr & AnyFactory to the factory feature BREAKING CHANGE: FactoryPtr has been limited to the factory feature --- src/ptr.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ptr.rs') diff --git a/src/ptr.rs b/src/ptr.rs index 08c3788..6f93fee 100644 --- a/src/ptr.rs +++ b/src/ptr.rs @@ -14,6 +14,7 @@ pub type TransientPtr = Box; pub type SingletonPtr = Rc; /// A smart pointer to a factory. +#[cfg(feature = "factory")] pub type FactoryPtr = Rc; /// Some smart pointer. @@ -29,6 +30,7 @@ where Singleton(SingletonPtr), /// A smart pointer to a factory. + #[cfg(feature = "factory")] Factory(FactoryPtr), } @@ -63,5 +65,7 @@ where { create_as_variant_fn!(Transient); create_as_variant_fn!(Singleton); + + #[cfg(feature = "factory")] create_as_variant_fn!(Factory); } -- cgit v1.2.3-18-g5258