]> Repositorios git - scryer-prolog.git/commitdiff
move drop to impl Drop
authorDanil Platonov <[email protected]>
Mon, 26 Jan 2026 12:57:28 +0000 (04:57 -0800)
committerDanil Platonov <[email protected]>
Mon, 26 Jan 2026 12:57:28 +0000 (04:57 -0800)
src/machine/streams.rs

index f966d91ff163cd7b85cb9609e8e43c49fc4c0ef5..1169c94dea7cd3cd365bf4e9f266ff551e2b32fa 100644 (file)
@@ -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(())