Rollup merge of #73752 - TyPR124:invalid-parameter-error, r=LukasKalbertodt
Remap Windows ERROR_INVALID_PARAMETER to ErrorKind::InvalidInput from Other I don't know if this is acceptable or how likely it is to break existing code, but it seem to me ERROR_INVALID_PARAMETER "The parameter is incorrect" should map to ErrorKind::InvalidInput "A parameter was incorrect". Previously this value fell through to ErrorKind::Other. I can't speak for anyone but myself, but I instinctively thought it would be InvalidInput.
This commit is contained in:
commit
3951a98ec5
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ 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_INVALID_PARAMETER => return ErrorKind::InvalidInput,
|
||||
c::ERROR_SEM_TIMEOUT
|
||||
| c::WAIT_TIMEOUT
|
||||
| c::ERROR_DRIVER_CANCEL_TIMEOUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue