fix send body confusion

This commit is contained in:
Martin Algesten
2018-07-03 10:54:22 +02:00
parent 6981abb359
commit 454e5a123f
2 changed files with 14 additions and 7 deletions

View File

@@ -53,6 +53,12 @@ pub struct SizedReader {
pub reader: Box<dyn Read + 'static>,
}
impl ::std::fmt::Debug for SizedReader {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> {
write!(f, "SizedReader[size={:?},reader]", self.size)
}
}
impl SizedReader {
fn new(size: Option<usize>, reader: Box<dyn Read + 'static>) -> Self {
SizedReader { size, reader }