@@ -851,10 +851,7 @@ where
851
851
/// }
852
852
/// # }
853
853
#[ 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
858
855
where
859
856
K :: DynamicType : Default ,
860
857
{
@@ -881,16 +878,12 @@ where
881
878
/// [`dynamic`]: kube_client::core::dynamic
882
879
#[ cfg( feature = "unstable-runtime-subscribe" ) ]
883
880
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 ,
885
882
reader : Store < K > ,
886
883
dyntype : K :: DynamicType ,
887
884
) -> Self {
888
885
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 ( ) ;
894
887
trigger_selector. push ( self_watcher) ;
895
888
Self {
896
889
trigger_selector,
@@ -1119,7 +1112,7 @@ where
1119
1112
#[ must_use]
1120
1113
pub fn owns_shared_stream < Child : Resource < DynamicType = ( ) > + Send + ' static > (
1121
1114
self ,
1122
- trigger : impl Stream < Item = impl Into < Option < Arc < Child > > > + Send + ' static > + Send + ' static ,
1115
+ trigger : impl Stream < Item = Arc < Child > > + Send + ' static ,
1123
1116
) -> Self {
1124
1117
self . owns_shared_stream_with ( trigger, ( ) )
1125
1118
}
@@ -1137,17 +1130,13 @@ where
1137
1130
#[ must_use]
1138
1131
pub fn owns_shared_stream_with < Child : Resource < DynamicType = ( ) > + Send + ' static > (
1139
1132
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 ,
1141
1134
dyntype : Child :: DynamicType ,
1142
1135
) -> Self
1143
1136
where
1144
1137
Child :: DynamicType : Debug + Eq + Hash + Clone ,
1145
1138
{
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) ;
1151
1140
self . trigger_selector . push ( child_watcher. boxed ( ) ) ;
1152
1141
self
1153
1142
}
@@ -1394,7 +1383,7 @@ where
1394
1383
#[ must_use]
1395
1384
pub fn watches_shared_stream < Other , I > (
1396
1385
self ,
1397
- trigger : impl Stream < Item = impl Into < Option < Arc < Other > > > + Send + ' static > + Send + ' static ,
1386
+ trigger : impl Stream < Item = Arc < Other > > + Send + ' static ,
1398
1387
mapper : impl Fn ( Arc < Other > ) -> I + Sync + Send + ' static ,
1399
1388
) -> Self
1400
1389
where
@@ -1419,7 +1408,7 @@ where
1419
1408
#[ must_use]
1420
1409
pub fn watches_shared_stream_with < Other , I > (
1421
1410
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 ,
1423
1412
mapper : impl Fn ( Arc < Other > ) -> I + Sync + Send + ' static ,
1424
1413
dyntype : Other :: DynamicType ,
1425
1414
) -> Self
@@ -1429,11 +1418,7 @@ where
1429
1418
I : ' static + IntoIterator < Item = ObjectRef < K > > ,
1430
1419
I :: IntoIter : Send ,
1431
1420
{
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) ;
1437
1422
self . trigger_selector . push ( other_watcher. boxed ( ) ) ;
1438
1423
self
1439
1424
}
0 commit comments