From 337d9c5583c4a58cc17b4ad84c834bb002173649 Mon Sep 17 00:00:00 2001 From: Danil Platonov Date: Mon, 26 Jan 2026 04:57:28 -0800 Subject: [PATCH] move drop to impl Drop --- src/machine/streams.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/machine/streams.rs b/src/machine/streams.rs index f966d91f..1169c94d 100644 --- a/src/machine/streams.rs +++ b/src/machine/streams.rs @@ -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(()) -- 2.54.0