Skip to content

Commit

Permalink
Fix Debug impl for TestContext
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Aug 20, 2024
1 parent 8758349 commit 58a5fb8
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions crates/testkit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,7 @@ pub struct TestContext {

impl Debug for TestContext {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut st = f.debug_struct("TestContext");
st.field("http1", &self.http1).field("local_addr", &self.addr);

#[cfg(feature = "http2")]
{
st = st.field("http1", &self.http2);
}

st.finish()
f.debug_struct("TestContext").field("local_addr", &self.addr).finish()
}
}

Expand Down

0 comments on commit 58a5fb8

Please sign in to comment.