From 5732b8331e1e1888e4df6f3025b2f25234288786 Mon Sep 17 00:00:00 2001 From: Patrick Ribbsaeter <233187023+patrickswedish@users.noreply.github.com> Date: Sat, 10 Oct 2026 19:23:39 +0200 Subject: [PATCH] chore(rust): fix clippy infallible_destructuring_match on TimerFd In release builds (or when building utils without test-utils), TimerFd::Mock is conditionally excluded via #[cfg(any(test, feature = "test-utils"))]. Under Rust 1.97.0+, matching on self in TimerFd methods collapses to a single-variant match on TimerFd::Real(file), causing clippy to emit clippy::infallible_destructuring_match errors with -D warnings. Annotate #[allow(clippy::infallible_destructuring_match)] at the TimerFd impl block level so both test/test-utils and release builds compile cleanly without warnings. Signed-off-by: Patrick Ribbsaeter <233187023+patrickswedish@users.noreply.github.com> --- src/utils/src/time.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/src/time.rs b/src/utils/src/time.rs index f6935eb..8dce8da 100644 --- a/src/utils/src/time.rs +++ b/src/utils/src/time.rs @@ -221,7 +221,7 @@ pub enum TimerFd { Mock(MockTimer), } -#[allow(clippy::new_without_default)] +#[allow(clippy::new_without_default, clippy::infallible_destructuring_match)] impl TimerFd { /// Creates new MONOTONIC and NONBLOCK timerfd pub fn new() -> Self { -- 2.55.0.windows.3