}
#[cfg(feature = "http")]
-impl HttpWriteStream {
- // TODO why is this suddenly dead code and should it be used somewhere?
- // Should this be impl Drop for HttpWriteStream?
- #[allow(dead_code)]
+impl Drop for HttpWriteStream {
fn drop(&mut self) {
let headers = unsafe { std::mem::ManuallyDrop::take(&mut self.headers) };
let buffer = unsafe { std::mem::ManuallyDrop::take(&mut self.buffer) };
}
#[cfg(feature = "http")]
Stream::HttpWrite(mut http_stream) => {
- http_stream.inner_mut().drop();
http_stream.drop_payload();
Ok(())