@@ -851,10 +851,7 @@ where
851851 /// }
852852 /// # }
853853 #[ cfg( feature = "unstable-runtime-subscribe" ) ]
854- pub fn for_shared_stream (
855- trigger : impl Stream < Item = impl Into < Option < Arc < K > > > + Send + ' static > + Send + ' static ,
856- reader : Store < K > ,
857- ) -> Self
854+ pub fn for_shared_stream ( trigger : impl Stream < Item = Arc < K > > + Send + ' static , reader : Store < K > ) -> Self
858855 where
859856 K :: DynamicType : Default ,
860857 {
@@ -881,16 +878,12 @@ where
881878 /// [`dynamic`]: kube_client::core::dynamic
882879 #[ cfg( feature = "unstable-runtime-subscribe" ) ]
883880 pub fn for_shared_stream_with (
884- trigger : impl Stream < Item = impl Into < Option < Arc < K > > > + Send + ' static > + Send + ' static ,
881+ trigger : impl Stream < Item = Arc < K > > + Send + ' static ,
885882 reader : Store < K > ,
886883 dyntype : K :: DynamicType ,
887884 ) -> Self {
888885 let mut trigger_selector = stream:: SelectAll :: new ( ) ;
889- let self_watcher = trigger_self_shared (
890- trigger. filter_map ( |r| async move { r. into ( ) } ) . map ( Ok ) ,
891- dyntype. clone ( ) ,
892- )
893- . boxed ( ) ;
886+ let self_watcher = trigger_self_shared ( trigger. map ( Ok ) , dyntype. clone ( ) ) . boxed ( ) ;
894887 trigger_selector. push ( self_watcher) ;
895888 Self {
896889 trigger_selector,
@@ -1119,7 +1112,7 @@ where
11191112 #[ must_use]
11201113 pub fn owns_shared_stream < Child : Resource < DynamicType = ( ) > + Send + ' static > (
11211114 self ,
1122- trigger : impl Stream < Item = impl Into < Option < Arc < Child > > > + Send + ' static > + Send + ' static ,
1115+ trigger : impl Stream < Item = Arc < Child > > + Send + ' static ,
11231116 ) -> Self {
11241117 self . owns_shared_stream_with ( trigger, ( ) )
11251118 }
@@ -1137,17 +1130,13 @@ where
11371130 #[ must_use]
11381131 pub fn owns_shared_stream_with < Child : Resource < DynamicType = ( ) > + Send + ' static > (
11391132 mut self ,
1140- trigger : impl Stream < Item = impl Into < Option < Arc < Child > > > + Send + ' static > + Send + ' static ,
1133+ trigger : impl Stream < Item = Arc < Child > > + Send + ' static ,
11411134 dyntype : Child :: DynamicType ,
11421135 ) -> Self
11431136 where
11441137 Child :: DynamicType : Debug + Eq + Hash + Clone ,
11451138 {
1146- let child_watcher = trigger_owners_shared (
1147- trigger. filter_map ( |r| async move { r. into ( ) } ) . map ( Ok ) ,
1148- self . dyntype . clone ( ) ,
1149- dyntype,
1150- ) ;
1139+ let child_watcher = trigger_owners_shared ( trigger. map ( Ok ) , self . dyntype . clone ( ) , dyntype) ;
11511140 self . trigger_selector . push ( child_watcher. boxed ( ) ) ;
11521141 self
11531142 }
@@ -1394,7 +1383,7 @@ where
13941383 #[ must_use]
13951384 pub fn watches_shared_stream < Other , I > (
13961385 self ,
1397- trigger : impl Stream < Item = impl Into < Option < Arc < Other > > > + Send + ' static > + Send + ' static ,
1386+ trigger : impl Stream < Item = Arc < Other > > + Send + ' static ,
13981387 mapper : impl Fn ( Arc < Other > ) -> I + Sync + Send + ' static ,
13991388 ) -> Self
14001389 where
@@ -1419,7 +1408,7 @@ where
14191408 #[ must_use]
14201409 pub fn watches_shared_stream_with < Other , I > (
14211410 mut self ,
1422- trigger : impl Stream < Item = impl Into < Option < Arc < Other > > > + Send + ' static > + Send + ' static ,
1411+ trigger : impl Stream < Item = Arc < Other > > + Send + ' static ,
14231412 mapper : impl Fn ( Arc < Other > ) -> I + Sync + Send + ' static ,
14241413 dyntype : Other :: DynamicType ,
14251414 ) -> Self
@@ -1429,11 +1418,7 @@ where
14291418 I : ' static + IntoIterator < Item = ObjectRef < K > > ,
14301419 I :: IntoIter : Send ,
14311420 {
1432- let other_watcher = trigger_others_shared (
1433- trigger. filter_map ( |r| async move { r. into ( ) } ) . map ( Ok ) ,
1434- mapper,
1435- dyntype,
1436- ) ;
1421+ let other_watcher = trigger_others_shared ( trigger. map ( Ok ) , mapper, dyntype) ;
14371422 self . trigger_selector . push ( other_watcher. boxed ( ) ) ;
14381423 self
14391424 }
0 commit comments