about summary refs log tree commit diff
path: root/library/std/src/sys/windows
diff options
context:
space:
mode:
authorChris Denton <christophersdenton@gmail.com>2022-07-06 16:36:52 +0100
committerChris Denton <christophersdenton@gmail.com>2022-07-06 16:36:52 +0100
commitae60dbdcac2c4c94293980cdb6872228fc4d8aa9 (patch)
tree0a42514d5c38d1253261d0e379bb6034da793371 /library/std/src/sys/windows
parent54f79babae06d3772c067f696e5b12db822ae25f (diff)
downloadrust-ae60dbdcac2c4c94293980cdb6872228fc4d8aa9.tar.gz
rust-ae60dbdcac2c4c94293980cdb6872228fc4d8aa9.zip
Use `rtabort!` instead of `process::abort`
Diffstat (limited to 'library/std/src/sys/windows')
-rw-r--r--library/std/src/sys/windows/handle.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/library/std/src/sys/windows/handle.rs b/library/std/src/sys/windows/handle.rs
index 1e7b6e1eab0..cea04549d3d 100644
--- a/library/std/src/sys/windows/handle.rs
+++ b/library/std/src/sys/windows/handle.rs
@@ -252,10 +252,7 @@ impl Handle {
             // If the operation has not completed then abort the process.
             // Doing otherwise means that the buffer and stack may be written to
             // after this function returns.
-            c::STATUS_PENDING => {
-                eprintln!("I/O error: operation failed to complete synchronously");
-                crate::process::abort();
-            }
+            c::STATUS_PENDING => rtabort!("I/O error: operation failed to complete synchronously"),
 
             // Return `Ok(0)` when there's nothing more to read.
             c::STATUS_END_OF_FILE => Ok(0),
@@ -298,9 +295,7 @@ impl Handle {
             // If the operation has not completed then abort the process.
             // Doing otherwise means that the buffer may be read and the stack
             // written to after this function returns.
-            c::STATUS_PENDING => {
-                rtabort!("I/O error: operation failed to complete synchronously");
-            }
+            c::STATUS_PENDING => rtabort!("I/O error: operation failed to complete synchronously"),
 
             // Success!
             status if c::nt_success(status) => Ok(io_status.Information),