mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Use rtabort!
instead of process::abort
This commit is contained in:
parent
54f79babae
commit
ae60dbdcac
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user