From 15222f2f5d38a6eb7f3b51806ce1e2041e3c8ee0 Mon Sep 17 00:00:00 2001 From: vvvviiv Date: Tue, 17 Oct 2023 11:11:12 +0800 Subject: [PATCH] Implement `Debug` for `IdleTimeout`. Fix typo. --- quinn-proto/src/config.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/quinn-proto/src/config.rs b/quinn-proto/src/config.rs index dca8676d6..499610571 100644 --- a/quinn-proto/src/config.rs +++ b/quinn-proto/src/config.rs @@ -384,7 +384,7 @@ impl fmt::Debug for TransportConfig { congestion_controller_factory: _, enable_segmentation_offload, } = self; - fmt.debug_struct("TranportConfig") + fmt.debug_struct("TransportConfig") .field("max_concurrent_bidi_streams", max_concurrent_bidi_streams) .field("max_concurrent_uni_streams", max_concurrent_uni_streams) .field("max_idle_timeout", max_idle_timeout) @@ -999,3 +999,9 @@ impl std::convert::TryFrom for IdleTimeout { Ok(Self(inner)) } } + +impl fmt::Debug for IdleTimeout { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.fmt(f) + } +}