Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Addressed minor review comments
Browse files Browse the repository at this point in the history
As per discussion in #46
  • Loading branch information
mzabaluev committed Jun 4, 2019
1 parent 5309b00 commit bea987b
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/client/background.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use futures::{Future, Poll};
use hyper::body::Payload;
use hyper::client::conn::Connection as HyperConnection;
use log::error;
use std::fmt::{self, Debug};
use tokio_io::{AsyncRead, AsyncWrite};

use log::error;

/// Background task for a client connection.
///
/// This type is not used directly by a user of this library,
Expand All @@ -18,18 +17,6 @@ where
connection: HyperConnection<T, B>,
}

impl<T, B> Debug for Background<T, B>
where
T: Debug + AsyncRead + AsyncWrite + Send + 'static,
B: Payload,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Background")
.field("connection", &self.connection)
.finish()
}
}

impl<T, B> Background<T, B>
where
T: AsyncRead + AsyncWrite + Send + 'static,
Expand All @@ -54,3 +41,15 @@ where
})
}
}

impl<T, B> Debug for Background<T, B>
where
T: Debug + AsyncRead + AsyncWrite + Send + 'static,
B: Payload,
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Background")
.field("connection", &self.connection)
.finish()
}
}

0 comments on commit bea987b

Please sign in to comment.