From 67c34a59378745d38ef9e23763c7096da2203443 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 11 Apr 2019 16:01:54 -0700 Subject: [PATCH] Add Debug impl for BoxedSocket --- awc/CHANGES.md | 4 ++++ awc/src/connect.rs | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/awc/CHANGES.md b/awc/CHANGES.md index 767761ce..4eeed7a1 100644 --- a/awc/CHANGES.md +++ b/awc/CHANGES.md @@ -6,6 +6,10 @@ * Do not set any default headers +### Added + +* Add Debug impl for BoxedSocket + ## [0.1.0-alpha.4] - 2019-04-08 diff --git a/awc/src/connect.rs b/awc/src/connect.rs index 77cd1fbf..bfc9da05 100644 --- a/awc/src/connect.rs +++ b/awc/src/connect.rs @@ -1,4 +1,4 @@ -use std::io; +use std::{fmt, io}; use actix_codec::{AsyncRead, AsyncWrite, Framed}; use actix_http::body::Body; @@ -102,6 +102,12 @@ impl AsyncSocket for Socket { pub struct BoxedSocket(Box); +impl fmt::Debug for BoxedSocket { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "BoxedSocket") + } +} + impl io::Read for BoxedSocket { fn read(&mut self, buf: &mut [u8]) -> io::Result { self.0.as_read_mut().read(buf)