Explicitly ignore into_raw_handle() using let _ = in sys/pal/wind… · model-checking/verify-rust-std@3b86ae3 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 3b86ae3

Explicitly ignore into_raw_handle() using let _ = in sys/pal/windows.

File tree

2 files changed

lines changed

2 files changed

lines changed

Lines changed: 1 addition & 1 deletion

Original file line number Diff line number Diff line change
@@ -571,7 +571,7 @@ impl Stdio {
571 571 Ok(io) => unsafe {
572 572 let io = Handle::from_raw_handle(io);
573 573 let ret = io.duplicate(0, true, c::DUPLICATE_SAME_ACCESS);
574 - io.into_raw_handle();
574 +let _ = io.into_raw_handle(); // Don't close the handle
575 575 ret
576 576 },
577 577 // If no stdio handle is available, then propagate the null value.

Lines changed: 2 additions & 2 deletions

Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ fn write(
101 101 unsafe {
102 102 let handle = Handle::from_raw_handle(handle);
103 103 let ret = handle.write(data);
104 - handle.into_raw_handle(); // Don't close the handle
104 +let _ = handle.into_raw_handle(); // Don't close the handle
105 105 return ret;
106 106 }
107 107 }
@@ -250,7 +250,7 @@ impl io::Read for Stdin {
250 250 unsafe {
251 251 let handle = Handle::from_raw_handle(handle);
252 252 let ret = handle.read(buf);
253 - handle.into_raw_handle(); // Don't close the handle
253 +let _ = handle.into_raw_handle(); // Don't close the handle
254 254 return ret;
255 255 }
256 256 }