Skip to content

Commit 14b5010

Browse files
authored
Clippy fixes 2026 q1 (#1881)
* clippy fix portforward manual multiple_of 2 Signed-off-by: clux <sszynrae@gmail.com> * allow large error enums for now Signed-off-by: clux <sszynrae@gmail.com> --------- Signed-off-by: clux <sszynrae@gmail.com>
1 parent abd316b commit 14b5010

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

kube-client/src/api/portforward.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ where
301301
}
302302

303303
// Odd channels are for errors for (n - 1)/2 th port
304-
if ch % 2 != 0 {
304+
if !ch.is_multiple_of(2) {
305305
// A port sends at most one error message because it's considered unusable after this.
306306
if let Some(sender) = error_senders[port_index].take() {
307307
let s = String::from_utf8(bytes.into_iter().collect())

kube-runtime/src/controller/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ const APPLIER_REQUEUE_BUF_SIZE: usize = 100;
332332
/// (such as triggering from arbitrary [`Stream`]s), at the cost of being a bit more verbose.
333333
#[allow(clippy::needless_pass_by_value)]
334334
#[allow(clippy::type_complexity)]
335+
#[allow(clippy::result_large_err)] // see #1880 as an alt; https://github.com/kube-rs/kube/pull/1880
335336
pub fn applier<K, QueueStream, ReconcilerFut, Ctx>(
336337
mut reconciler: impl FnMut(Arc<K>, Arc<Ctx>) -> ReconcilerFut,
337338
error_policy: impl Fn(Arc<K>, &ReconcilerFut::Error, Arc<Ctx>) -> Action,

0 commit comments

Comments
 (0)