From de11a35ed0e9d5773ffba08bb378ccd6599e5c7f Mon Sep 17 00:00:00 2001 From: rex-schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:19:40 +0200 Subject: [PATCH] fix(service): allow unnecessary_cast for eCAL 6.0/6.1.1 compatibility eCAL_eCallState_* constants are generated as u32 by bindgen against eCAL 6.0.x headers, making the 'as i32' casts required. In eCAL 6.1.1 bindgen generates them as i32, making the casts redundant and triggering clippy's unnecessary_cast lint. Suppress the lint with #[allow(clippy::unnecessary_cast)] on the From impl so the same code compiles cleanly against both eCAL versions. --- rustecal-service/src/types.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rustecal-service/src/types.rs b/rustecal-service/src/types.rs index 9cfa850..4ee7a20 100644 --- a/rustecal-service/src/types.rs +++ b/rustecal-service/src/types.rs @@ -16,6 +16,7 @@ impl CallState { } impl From for CallState { + #[allow(clippy::unnecessary_cast)] // eCAL_eCallState constants may be u32 or i32 depending on eCAL version fn from(value: i32) -> Self { match value { x if x == rustecal_sys::eCAL_eCallState_eCAL_eCallState_none as i32 => CallState::None,