@@ -480,7 +480,6 @@ pub struct ConnectorLink {
480480 /// Mirrors the producer_factory pattern used for inbound connectors.
481481 ///
482482 /// Available in both `std` and `no_std + alloc` environments.
483- #[ cfg( feature = "alloc" ) ]
484483 pub consumer_factory : Option < ConsumerFactoryFn > ,
485484
486485 /// Optional dynamic topic provider
@@ -507,10 +506,7 @@ impl Debug for ConnectorLink {
507506 )
508507 . field (
509508 "consumer_factory" ,
510- #[ cfg( feature = "alloc" ) ]
511509 & self . consumer_factory . as_ref ( ) . map ( |_| "<function>" ) ,
512- #[ cfg( not( feature = "alloc" ) ) ]
513- & None :: < ( ) > ,
514510 )
515511 . field (
516512 "topic_provider" ,
@@ -527,7 +523,6 @@ impl ConnectorLink {
527523 url,
528524 config : Vec :: new ( ) ,
529525 serializer : None ,
530- #[ cfg( feature = "alloc" ) ]
531526 consumer_factory : None ,
532527 topic_provider : None ,
533528 }
@@ -547,7 +542,6 @@ impl ConnectorLink {
547542 /// Returns None if no factory is configured.
548543 ///
549544 /// Available in both `std` and `no_std + alloc` environments.
550- #[ cfg( feature = "alloc" ) ]
551545 pub fn create_consumer (
552546 & self ,
553547 db_any : Arc < dyn core:: any:: Any + Send + Sync > ,
@@ -598,7 +592,6 @@ pub enum DeserializerKind {
598592/// the factory in a type-erased InboundConnectorLink.
599593///
600594/// Available in both `std` and `no_std + alloc` environments.
601- #[ cfg( feature = "alloc" ) ]
602595pub type ProducerFactoryFn =
603596 Arc < dyn Fn ( Arc < dyn core:: any:: Any + Send + Sync > ) -> Box < dyn ProducerTrait > + Send + Sync > ;
604597
@@ -651,7 +644,6 @@ pub trait ProducerTrait: Send + Sync {
651644/// Mirrors the ProducerFactoryFn pattern for symmetry between inbound and outbound.
652645///
653646/// Available in both `std` and `no_std + alloc` environments.
654- #[ cfg( feature = "alloc" ) ]
655647pub type ConsumerFactoryFn =
656648 Arc < dyn Fn ( Arc < dyn core:: any:: Any + Send + Sync > ) -> Box < dyn ConsumerTrait > + Send + Sync > ;
657649
@@ -719,7 +711,6 @@ pub struct InboundConnectorLink {
719711 /// Captures the record type T at link_from() call time.
720712 ///
721713 /// Available in both `std` and `no_std + alloc` environments.
722- #[ cfg( feature = "alloc" ) ]
723714 pub producer_factory : Option < ProducerFactoryFn > ,
724715
725716 /// Optional dynamic topic resolver (late-binding)
@@ -737,7 +728,6 @@ impl Clone for InboundConnectorLink {
737728 url : self . url . clone ( ) ,
738729 config : self . config . clone ( ) ,
739730 deserializer : self . deserializer . clone ( ) ,
740- #[ cfg( feature = "alloc" ) ]
741731 producer_factory : self . producer_factory . clone ( ) ,
742732 topic_resolver : self . topic_resolver . clone ( ) ,
743733 }
@@ -765,16 +755,14 @@ impl InboundConnectorLink {
765755 url,
766756 config : Vec :: new ( ) ,
767757 deserializer,
768- #[ cfg( feature = "alloc" ) ]
769758 producer_factory : None ,
770759 topic_resolver : None ,
771760 }
772761 }
773762
774- /// Sets the producer factory callback (alloc feature)
763+ /// Sets the producer factory callback.
775764 ///
776765 /// Available in both `std` and `no_std + alloc` environments.
777- #[ cfg( feature = "alloc" ) ]
778766 pub fn with_producer_factory < F > ( mut self , factory : F ) -> Self
779767 where
780768 F : Fn ( Arc < dyn core:: any:: Any + Send + Sync > ) -> Box < dyn ProducerTrait >
@@ -786,10 +774,9 @@ impl InboundConnectorLink {
786774 self
787775 }
788776
789- /// Creates a producer using the stored factory (alloc feature)
777+ /// Creates a producer using the stored factory.
790778 ///
791779 /// Available in both `std` and `no_std + alloc` environments.
792- #[ cfg( feature = "alloc" ) ]
793780 pub fn create_producer (
794781 & self ,
795782 db_any : Arc < dyn core:: any:: Any + Send + Sync > ,
0 commit comments