From: Danil Platonov Date: Mon, 26 Jan 2026 12:57:28 +0000 (-0800) Subject: move drop to impl Drop X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=337d9c5583c4a58cc17b4ad84c834bb002173649;p=scryer-prolog.git move drop to impl Drop --- 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(())