fix dealloc issues

This commit is contained in:
Martin Algesten
2018-10-23 20:18:24 +01:00
parent df7b5ca839
commit 2c9e62ad8c
3 changed files with 35 additions and 23 deletions

View File

@@ -18,16 +18,6 @@ pub enum Stream {
Test(Box<dyn Read + Send>, Vec<u8>),
}
impl Drop for Stream {
fn drop(&mut self) {
match self {
#[cfg(feature = "tls")]
Stream::Https(s) => { s.shutdown().ok(); },
_ => (),
}
}
}
impl ::std::fmt::Debug for Stream {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> {
write!(