about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorZachary S <zasample18+github@gmail.com>2024-07-10 21:03:25 -0500
committerZachary S <zasample18+github@gmail.com>2024-07-10 21:03:25 -0500
commit84d84daf1735d8996cdaf3aea487051215cffdf3 (patch)
treebe3dd773401aa537e68f05694c325fbe40d857d3 /library/std/src
parent6d477d3a9de714d877a9eda48b0eda3e12e301be (diff)
downloadrust-84d84daf1735d8996cdaf3aea487051215cffdf3.tar.gz
rust-84d84daf1735d8996cdaf3aea487051215cffdf3.zip
Explicitly ignore `into_raw_handle()` using `let _ =` in sys/pal/windows.
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/pal/windows/process.rs2
-rw-r--r--library/std/src/sys/pal/windows/stdio.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/windows/process.rs b/library/std/src/sys/pal/windows/process.rs
index c62764696b8..6b3b79149ce 100644
--- a/library/std/src/sys/pal/windows/process.rs
+++ b/library/std/src/sys/pal/windows/process.rs
@@ -571,7 +571,7 @@ impl Stdio {
             Ok(io) => unsafe {
                 let io = Handle::from_raw_handle(io);
                 let ret = io.duplicate(0, true, c::DUPLICATE_SAME_ACCESS);
-                io.into_raw_handle();
+                let _ = io.into_raw_handle(); // Don't close the handle
                 ret
             },
             // If no stdio handle is available, then propagate the null value.
diff --git a/library/std/src/sys/pal/windows/stdio.rs b/library/std/src/sys/pal/windows/stdio.rs
index 10aeeac07ea..88b3996466f 100644
--- a/library/std/src/sys/pal/windows/stdio.rs
+++ b/library/std/src/sys/pal/windows/stdio.rs
@@ -101,7 +101,7 @@ fn write(
         unsafe {
             let handle = Handle::from_raw_handle(handle);
             let ret = handle.write(data);
-            handle.into_raw_handle(); // Don't close the handle
+            let _ = handle.into_raw_handle(); // Don't close the handle
             return ret;
         }
     }
@@ -250,7 +250,7 @@ impl io::Read for Stdin {
             unsafe {
                 let handle = Handle::from_raw_handle(handle);
                 let ret = handle.read(buf);
-                handle.into_raw_handle(); // Don't close the handle
+                let _ = handle.into_raw_handle(); // Don't close the handle
                 return ret;
             }
         }