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:
Andrew Phillips (aider)
2025-05-12 11:15:32 -03:00
parent f9dd390a12
commit 723ec2a6e8

View File

@@ -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,