@@ -16,16 +16,17 @@ use derivative::Derivative;
1616use futures:: {
1717 channel,
1818 future:: { self , BoxFuture } ,
19- ready , stream, Future , FutureExt , Stream , StreamExt , TryFuture , TryFutureExt , TryStream , TryStreamExt ,
19+ stream, FutureExt , Stream , StreamExt , TryFuture , TryFutureExt , TryStream , TryStreamExt ,
2020} ;
2121use kube_client:: api:: { Api , DynamicObject , Resource } ;
2222use pin_project:: pin_project;
2323use serde:: de:: DeserializeOwned ;
2424use std:: {
2525 fmt:: { Debug , Display } ,
26+ future:: Future ,
2627 hash:: Hash ,
2728 sync:: Arc ,
28- task:: Poll ,
29+ task:: { ready , Poll } ,
2930 time:: Duration ,
3031} ;
3132use stream:: BoxStream ;
@@ -326,7 +327,8 @@ where
326327 . instrument ( reconciler_span)
327328 . left_future ( )
328329 }
329- None => future:: err ( Error :: ObjectNotFound ( request. obj_ref . erase ( ) ) ) . right_future ( ) ,
330+ None => std:: future:: ready ( Err ( Error :: ObjectNotFound ( request. obj_ref . erase ( ) ) ) )
331+ . right_future ( ) ,
330332 }
331333 } ,
332334 )
@@ -1155,7 +1157,7 @@ where
11551157 /// use kube::{Api, Client, ResourceExt};
11561158 /// use kube_runtime::{
11571159 /// controller::{Controller, Action},
1158- /// watcher,
1160+ /// watcher,
11591161 /// };
11601162 /// use std::{convert::Infallible, sync::Arc};
11611163 /// Controller::new(
@@ -1274,7 +1276,7 @@ where
12741276
12751277#[ cfg( test) ]
12761278mod tests {
1277- use std:: { convert:: Infallible , sync:: Arc , time:: Duration } ;
1279+ use std:: { convert:: Infallible , pin :: pin , sync:: Arc , time:: Duration } ;
12781280
12791281 use super :: { Action , APPLIER_REQUEUE_BUF_SIZE } ;
12801282 use crate :: {
@@ -1283,7 +1285,7 @@ mod tests {
12831285 watcher:: { self , metadata_watcher, watcher, Event } ,
12841286 Config , Controller ,
12851287 } ;
1286- use futures:: { pin_mut , Stream , StreamExt , TryStreamExt } ;
1288+ use futures:: { Stream , StreamExt , TryStreamExt } ;
12871289 use k8s_openapi:: api:: core:: v1:: ConfigMap ;
12881290 use kube_client:: { core:: ObjectMeta , Api , Resource } ;
12891291 use serde:: de:: DeserializeOwned ;
@@ -1348,7 +1350,7 @@ mod tests {
13481350
13491351 let ( queue_tx, queue_rx) = futures:: channel:: mpsc:: unbounded :: < ObjectRef < ConfigMap > > ( ) ;
13501352 let ( store_rx, mut store_tx) = reflector:: store ( ) ;
1351- let applier = applier (
1353+ let mut applier = pin ! ( applier(
13521354 |obj, _| {
13531355 Box :: pin( async move {
13541356 // Try to flood the rescheduling buffer buffer by just putting it back in the queue immediately
@@ -1361,8 +1363,7 @@ mod tests {
13611363 store_rx,
13621364 queue_rx. map( Result :: <_, Infallible >:: Ok ) ,
13631365 Config :: default ( ) ,
1364- ) ;
1365- pin_mut ! ( applier) ;
1366+ ) ) ;
13661367 for i in 0 ..items {
13671368 let obj = ConfigMap {
13681369 metadata : ObjectMeta {
0 commit comments