move drop to impl Drop
This commit is contained in:
@@ -330,10 +330,7 @@ impl Write for HttpWriteStream {
|
||||
}
|
||||
|
||||
#[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) };
|
||||
@@ -1537,7 +1534,6 @@ impl Stream {
|
||||
}
|
||||
#[cfg(feature = "http")]
|
||||
Stream::HttpWrite(mut http_stream) => {
|
||||
http_stream.inner_mut().drop();
|
||||
http_stream.drop_payload();
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user