diff --git a/kube-runtime/src/controller/mod.rs b/kube-runtime/src/controller/mod.rs index 4a32dac36..e701b1d1b 100644 --- a/kube-runtime/src/controller/mod.rs +++ b/kube-runtime/src/controller/mod.rs @@ -332,6 +332,7 @@ const APPLIER_REQUEUE_BUF_SIZE: usize = 100; /// This is the "hard-mode" version of [`Controller`], which allows you some more customization /// (such as triggering from arbitrary [`Stream`]s), at the cost of being a bit more verbose. #[allow(clippy::needless_pass_by_value)] +#[allow(clippy::type_complexity)] pub fn applier( mut reconciler: impl FnMut(Arc, Arc) -> ReconcilerFut, error_policy: impl Fn(Arc, &ReconcilerFut::Error, Arc) -> Action, diff --git a/kube-runtime/src/reflector/store.rs b/kube-runtime/src/reflector/store.rs index f96ae6ec6..d6d264dea 100644 --- a/kube-runtime/src/reflector/store.rs +++ b/kube-runtime/src/reflector/store.rs @@ -1,4 +1,6 @@ -use super::{dispatcher::Dispatcher, Lookup, ObjectRef, ReflectHandle}; +use super::{dispatcher::Dispatcher, Lookup, ObjectRef}; +#[cfg(feature = "unstable-runtime-subscribe")] +use crate::reflector::ReflectHandle; use crate::{ utils::delayed_init::{self, DelayedInit}, watcher, diff --git a/kube-runtime/src/scheduler.rs b/kube-runtime/src/scheduler.rs index 967a5e126..1c391a136 100644 --- a/kube-runtime/src/scheduler.rs +++ b/kube-runtime/src/scheduler.rs @@ -65,7 +65,7 @@ impl Scheduler { } } -impl<'a, T: Hash + Eq + Clone, R> SchedulerProj<'a, T, R> { +impl SchedulerProj<'_, T, R> { /// Attempt to schedule a message into the queue. /// /// If the message is already in the queue then the earlier `request.run_at` takes precedence. @@ -147,7 +147,7 @@ pub struct Hold<'a, T, R> { scheduler: Pin<&'a mut Scheduler>, } -impl<'a, T, R> Stream for Hold<'a, T, R> +impl Stream for Hold<'_, T, R> where T: Eq + Hash + Clone, R: Stream>, @@ -177,7 +177,7 @@ pub struct HoldUnless<'a, T, R, C> { can_take_message: C, } -impl<'a, T, R, C> Stream for HoldUnless<'a, T, R, C> +impl Stream for HoldUnless<'_, T, R, C> where T: Eq + Hash + Clone, R: Stream>, diff --git a/kube-runtime/src/utils/delayed_init.rs b/kube-runtime/src/utils/delayed_init.rs index 7e273ae55..a80f8f8fa 100644 --- a/kube-runtime/src/utils/delayed_init.rs +++ b/kube-runtime/src/utils/delayed_init.rs @@ -61,7 +61,7 @@ impl DelayedInit { // Using a manually implemented future because we don't want to hold the lock across poll calls // since that would mean that an unpolled writer would stall all other tasks from being able to poll it struct Get<'a, T>(&'a DelayedInit); -impl<'a, T> Future for Get<'a, T> +impl Future for Get<'_, T> where T: Clone, {