From c604d68251afdd2461de53b5f503cd30d4a6d209 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Thu, 17 Oct 2024 14:48:44 +0200 Subject: [PATCH] Fix pre-commit --- src/codec/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/codec/mod.rs b/src/codec/mod.rs index dc27a18..ee97bb5 100644 --- a/src/codec/mod.rs +++ b/src/codec/mod.rs @@ -25,6 +25,7 @@ pub(crate) mod tcp; /// As defined by the spec for both RTU and TCP. const MAX_PDU_SIZE: usize = 253; +#[cfg(any(test, feature = "rtu", feature = "tcp"))] #[allow(clippy::cast_possible_truncation)] fn u16_len(len: usize) -> u16 { // This type conversion should always be safe, because either