Skip to content

Commit d2ae344

Browse files
committed
Fix dead_code warnings in fuzztarget builds
1 parent 5801d19 commit d2ae344

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/util/byte_utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pub fn slice_to_be32(v: &[u8]) -> u32 {
1010
((v[2] as u32) << 8*1) |
1111
((v[3] as u32) << 8*0)
1212
}
13+
#[cfg(not(feature = "fuzztarget"))] // Used only by poly1305
1314
#[inline]
1415
pub fn slice_to_le32(v: &[u8]) -> u32 {
1516
((v[0] as u32) << 8*0) |
@@ -54,6 +55,7 @@ pub fn be32_to_array(u: u32) -> [u8; 4] {
5455
v[3] = ((u >> 8*0) & 0xff) as u8;
5556
v
5657
}
58+
#[cfg(not(feature = "fuzztarget"))] // Used only by poly1305
5759
#[inline]
5860
pub fn le32_to_array(u: u32) -> [u8; 4] {
5961
let mut v = [0; 4];

src/util/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub mod ser;
66

77
pub(crate) mod byte_utils;
88
pub(crate) mod chacha20;
9+
#[cfg(not(feature = "fuzztarget"))]
910
pub(crate) mod poly1305;
1011
pub(crate) mod chacha20poly1305rfc;
1112
pub(crate) mod internal_traits;

0 commit comments

Comments
 (0)