Skip to content

Commit bc16cd3

Browse files
committed
Use rtabort! instead of process::abort
1 parent 9deaf76 commit bc16cd3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

std/src/sys/windows/handle.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ impl Handle {
252252
// If the operation has not completed then abort the process.
253253
// Doing otherwise means that the buffer and stack may be written to
254254
// after this function returns.
255-
c::STATUS_PENDING => {
256-
eprintln!("I/O error: operation failed to complete synchronously");
257-
crate::process::abort();
258-
}
255+
c::STATUS_PENDING => rtabort!("I/O error: operation failed to complete synchronously"),
259256

260257
// Return `Ok(0)` when there's nothing more to read.
261258
c::STATUS_END_OF_FILE => Ok(0),
@@ -298,9 +295,7 @@ impl Handle {
298295
// If the operation has not completed then abort the process.
299296
// Doing otherwise means that the buffer may be read and the stack
300297
// written to after this function returns.
301-
c::STATUS_PENDING => {
302-
rtabort!("I/O error: operation failed to complete synchronously");
303-
}
298+
c::STATUS_PENDING => rtabort!("I/O error: operation failed to complete synchronously"),
304299

305300
// Success!
306301
status if c::nt_success(status) => Ok(io_status.Information),

0 commit comments

Comments
 (0)