We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9eb3240 commit 8f51d7fCopy full SHA for 8f51d7f
src/cargo/util/flock.rs
@@ -435,13 +435,15 @@ fn error_unsupported(err: &std::io::Error) -> bool {
435
#[allow(unreachable_patterns)]
436
Some(libc::ENOTSUP | libc::EOPNOTSUPP) => true,
437
Some(libc::ENOSYS) => true,
438
- _ => false,
+ _ => err.kind() == std::io::ErrorKind::Unsupported,
439
}
440
441
442
#[cfg(windows)]
443
fn error_unsupported(err: &std::io::Error) -> bool {
444
use windows_sys::Win32::Foundation::ERROR_INVALID_FUNCTION;
445
- err.raw_os_error()
446
- .map_or(false, |x| x == ERROR_INVALID_FUNCTION as i32)
+ match err.raw_os_error() {
+ Some(code) if code == ERROR_INVALID_FUNCTION as i32 => true,
447
448
+ }
449
0 commit comments