diff --git a/crates/tor-proto/src/stream/data.rs b/crates/tor-proto/src/stream/data.rs index 203bf66fe..ddf30f2b3 100644 --- a/crates/tor-proto/src/stream/data.rs +++ b/crates/tor-proto/src/stream/data.rs @@ -279,7 +279,6 @@ impl Debug for DataWriterState { } /// Internal: the write part of a DataStream -#[derive(Debug)] struct DataWriterImpl { /// The underlying StreamTarget object. s: StreamTarget, @@ -295,6 +294,15 @@ struct DataWriterImpl { n_pending: usize, } +impl Debug for DataWriterImpl { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_struct("DataWriterImpl") + .field("sr", &self.s) + .field("n_pending", &self.n_pending) + .finish_non_exhaustive() + } +} + impl DataWriter { /// Helper for poll_flush() and poll_close(): Performs a flush, then /// closes the stream if should_close is true. @@ -479,7 +487,6 @@ impl std::fmt::Debug for DataReaderState { } /// Wrapper for the read part of a DataStream -#[derive(Debug)] struct DataReaderImpl { /// The underlying StreamReader object. s: StreamReader,