Skip to content

Commit 3951a98

Browse files
authored
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.
2 parents 8ac17d1 + b71a3e1 commit 3951a98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libstd/sys/windows/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
6161
c::ERROR_FILE_NOT_FOUND => return ErrorKind::NotFound,
6262
c::ERROR_PATH_NOT_FOUND => return ErrorKind::NotFound,
6363
c::ERROR_NO_DATA => return ErrorKind::BrokenPipe,
64+
c::ERROR_INVALID_PARAMETER => return ErrorKind::InvalidInput,
6465
c::ERROR_SEM_TIMEOUT
6566
| c::WAIT_TIMEOUT
6667
| c::ERROR_DRIVER_CANCEL_TIMEOUT

0 commit comments

Comments
 (0)