From 263af9f801c697079416072180d6d4169a0394d0 Mon Sep 17 00:00:00 2001 From: DanGould Date: Mon, 2 Dec 2024 13:13:51 -0500 Subject: [PATCH] Allow dead code for ParamBytes inner The code isn't actually dead, and is used in the bytes() function, but the compiler's dead code analysis doesn't fully track usage through feature flags and doesn't count if the pattern isn't considered a read of the field. --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7134e86..9ccdeb0 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -284,6 +284,7 @@ enum ParamInner<'a> { /// The lifetime of this may be shorter than that of [`Param<'a>`]. #[cfg(feature = "non-compliant-bytes")] #[cfg_attr(docsrs, doc(cfg(feature = "non-compliant-bytes")))] +#[cfg_attr(feature = "non-compliant-bytes", allow(dead_code))] pub struct ParamBytes<'a>(ParamIterInner<'a, core::iter::Cloned>>); /// Iterator over decoded bytes inside paramter. @@ -291,6 +292,7 @@ pub struct ParamBytes<'a>(ParamIterInner<'a, core::iter::Cloned`]. #[cfg(feature = "non-compliant-bytes")] #[cfg_attr(docsrs, doc(cfg(feature = "non-compliant-bytes")))] +#[cfg_attr(feature = "non-compliant-bytes", allow(dead_code))] pub struct ParamBytesOwned<'a>(ParamIterInner<'a, Either>, alloc::vec::IntoIter>>); #[cfg(feature = "non-compliant-bytes")]