Skip to content

Commit 263af9f

Browse files
committed
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.
1 parent 1f0d7b9 commit 263af9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,15 @@ enum ParamInner<'a> {
284284
/// The lifetime of this may be shorter than that of [`Param<'a>`].
285285
#[cfg(feature = "non-compliant-bytes")]
286286
#[cfg_attr(docsrs, doc(cfg(feature = "non-compliant-bytes")))]
287+
#[cfg_attr(feature = "non-compliant-bytes", allow(dead_code))]
287288
pub struct ParamBytes<'a>(ParamIterInner<'a, core::iter::Cloned<core::slice::Iter<'a, u8>>>);
288289

289290
/// Iterator over decoded bytes inside paramter.
290291
///
291292
/// The lifetime of this is same as that of [`Param<'a>`].
292293
#[cfg(feature = "non-compliant-bytes")]
293294
#[cfg_attr(docsrs, doc(cfg(feature = "non-compliant-bytes")))]
295+
#[cfg_attr(feature = "non-compliant-bytes", allow(dead_code))]
294296
pub struct ParamBytesOwned<'a>(ParamIterInner<'a, Either<core::iter::Cloned<core::slice::Iter<'a, u8>>, alloc::vec::IntoIter<u8>>>);
295297

296298
#[cfg(feature = "non-compliant-bytes")]

0 commit comments

Comments
 (0)