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.
2 parents 8862280 + 666b3b3 commit 8c31f39Copy full SHA for 8c31f39
src/uu/cp/src/platform/linux.rs
@@ -62,15 +62,8 @@ where
62
let dst_file = File::create(&dest)?;
63
let src_fd = src_file.as_raw_fd();
64
let dst_fd = dst_file.as_raw_fd();
65
- // Using .try_into().unwrap() is required as glibc, musl & android all have different type for ioctl()
66
- #[allow(clippy::unnecessary_fallible_conversions)]
67
- let result = unsafe {
68
- libc::ioctl(
69
- dst_fd,
70
- linux_raw_sys::ioctl::FICLONE.try_into().unwrap(),
71
- src_fd,
72
- )
73
- };
+ let result =
+ unsafe { libc::ioctl(dst_fd, linux_raw_sys::ioctl::FICLONE as libc::Ioctl, src_fd) };
74
if result == 0 {
75
return Ok(());
76
}
0 commit comments