diff --git a/src/frame/data.rs b/src/frame/data.rs index 7d3ea80..d52d598 100644 --- a/src/frame/data.rs +++ b/src/frame/data.rs @@ -119,6 +119,7 @@ impl fmt::Debug for Data { .field("stream_id", &self.stream_id) .field("flags", &self.flags) .field("pad_len", &self.pad_len) + // `data` purposefully excluded .finish() } } diff --git a/src/frame/headers.rs b/src/frame/headers.rs index 53e86f4..6211a83 100644 --- a/src/frame/headers.rs +++ b/src/frame/headers.rs @@ -16,7 +16,6 @@ use std::io::Cursor; /// Header frame /// /// This could be either a request or a response. -#[derive(Debug)] pub struct Headers { /// The ID of the stream with which this frame is associated. stream_id: StreamId, @@ -319,6 +318,17 @@ impl From for Frame { } } +impl fmt::Debug for Headers { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_struct("Headers") + .field("stream_id", &self.stream_id) + .field("stream_dep", &self.stream_dep) + .field("flags", &self.flags) + // `fields` and `pseudo` purposefully not included + .finish() + } +} + // ===== impl PushPromise ===== impl PushPromise {