Skip to content

Commit e9640b2

Browse files
committed
refactor(lib): fix some unused warnings
1 parent 721785e commit e9640b2

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/body/incoming.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,13 @@ impl Body for Incoming {
317317

318318
impl fmt::Debug for Incoming {
319319
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
320+
#[cfg(any(
321+
all(
322+
any(feature = "http1", feature = "http2"),
323+
any(feature = "client", feature = "server")
324+
),
325+
feature = "ffi"
326+
))]
320327
#[derive(Debug)]
321328
struct Streaming;
322329
#[derive(Debug)]

src/body/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ pub(crate) use self::incoming::Sender;
3535
pub(crate) use self::length::DecodedLength;
3636

3737
mod incoming;
38+
#[cfg(all(
39+
any(feature = "http1", feature = "http2"),
40+
any(feature = "client", feature = "server")
41+
))]
3842
mod length;
3943

4044
fn _assert_send_sync() {

src/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub(super) enum Parse {
9898
#[cfg(feature = "http1")]
9999
Header(Header),
100100
#[cfg(any(feature = "http1", feature = "http2"))]
101+
#[cfg_attr(feature = "http2", allow(unused))]
101102
TooLarge,
102103
Status,
103104
#[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]

0 commit comments

Comments
 (0)