diff options
| author | 0x79de <0x79de@gmail.com> | 2025-04-14 21:25:48 +0300 |
|---|---|---|
| committer | 0x79de <0x79de@gmail.com> | 2025-04-14 21:25:48 +0300 |
| commit | 188d44dd6e4949606e31c8009dffa4773ea25214 (patch) | |
| tree | 398d314bf1e01be75ee93aa2e3af793f9144175d /library/std/src/sys/pal/unix/mod.rs | |
| parent | 07d3fd1d9b9c1f07475b96a9d168564bf528db68 (diff) | |
| download | rust-188d44dd6e4949606e31c8009dffa4773ea25214.tar.gz rust-188d44dd6e4949606e31c8009dffa4773ea25214.zip | |
Fix: Map EOPNOTSUPP to ErrorKind::Unsupported on Unix
This change maps the EOPNOTSUPP errno value (95) to std::io::ErrorKind::Unsupported in the decode_error_kind function for Unix platforms. Previously, it was incorrectly mapped to ErrorKind::Uncategorized. Fixes #139803
Diffstat (limited to 'library/std/src/sys/pal/unix/mod.rs')
| -rw-r--r-- | library/std/src/sys/pal/unix/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs index f8733eb6119..3a790d9c868 100644 --- a/library/std/src/sys/pal/unix/mod.rs +++ b/library/std/src/sys/pal/unix/mod.rs @@ -274,6 +274,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind { libc::ETXTBSY => ExecutableFileBusy, libc::EXDEV => CrossesDevices, libc::EINPROGRESS => InProgress, + libc::EOPNOTSUPP => Unsupported, libc::EACCES | libc::EPERM => PermissionDenied, |
