fix: convert Fd to raw descriptor using .0 access
This addresses the E0412 error by correctly extracting the raw file descriptor from the nix::unistd::Fd newtype wrapper.
This commit is contained in:
@@ -147,7 +147,9 @@ pub fn mode_diff(
|
||||
compression_type: CompressionType,
|
||||
fd_write: nix::unistd::Fd,
|
||||
) -> std::thread::JoinHandle<()> {
|
||||
let pipe_writer_raw = unsafe { std::fs::File::from_raw_fd(fd_write.into_raw()) };
|
||||
// Convert nix::unistd::Fd to raw fd
|
||||
let raw_fd = fd_write.0;
|
||||
let pipe_writer_raw = unsafe { std::fs::File::from_raw_fd(raw_fd) };
|
||||
std::thread::spawn(move || {
|
||||
write_item_to_pipe(
|
||||
item_path,
|
||||
|
||||
Reference in New Issue
Block a user