-
Notifications
You must be signed in to change notification settings - Fork 13.5k
add Windows system error codes that should map to io::ErrorKind::TimedOut #71756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
c88e6a7
8667996
c69d6c8
e27a8b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,22 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { | |
c::ERROR_FILE_NOT_FOUND => return ErrorKind::NotFound, | ||
c::ERROR_PATH_NOT_FOUND => return ErrorKind::NotFound, | ||
c::ERROR_NO_DATA => return ErrorKind::BrokenPipe, | ||
c::ERROR_SEM_TIMEOUT => return ErrorKind::TimedOut, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could use or pattern here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just changed and pushed it. I initially decided against using the or pattern, because it isn't used for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe because it is too short to worth using the or pattern. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find it easier to read with the or pattern. Do you think it makes sense to also use it for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, forgot to run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a favor. Better let to official reviewers. |
||
c::WAIT_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_DRIVER_CANCEL_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_OPERATION_ABORTED => return ErrorKind::TimedOut, | ||
c::ERROR_SERVICE_REQUEST_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_COUNTER_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_RESOURCE_CALL_TIMED_OUT => return ErrorKind::TimedOut, | ||
c::ERROR_CTX_MODEM_RESPONSE_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_CTX_CLIENT_QUERY_TIMEOUT => return ErrorKind::TimedOut, | ||
c::FRS_ERR_SYSVOL_POPULATE_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_DS_TIMELIMIT_EXCEEDED => return ErrorKind::TimedOut, | ||
c::DNS_ERROR_RECORD_TIMED_OUT => return ErrorKind::TimedOut, | ||
c::ERROR_IPSEC_IKE_TIMED_OUT => return ErrorKind::TimedOut, | ||
c::ERROR_RUNLEVEL_SWITCH_TIMEOUT => return ErrorKind::TimedOut, | ||
c::ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT => return ErrorKind::TimedOut, | ||
_ => {} | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.