fix: add FromRawFd import and use it to create File instances
This commit is contained in:
@@ -5,6 +5,7 @@ use std::str::FromStr;
|
||||
use std::path::PathBuf;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::os::fd::FromRawFd;
|
||||
|
||||
use regex::Regex;
|
||||
|
||||
@@ -529,8 +530,8 @@ fn mode_diff(cmd: &mut Command, args: Args, ids: &mut Vec<i64>, tags: &mut Vec<S
|
||||
.spawn()
|
||||
.expect("Failed to execute diff command");
|
||||
|
||||
let mut stdout_a = unsafe { std::fs::File::from_raw_fd(fd_a_write) };
|
||||
let mut stdout_b = unsafe { std::fs::File::from_raw_fd(fd_b_write) };
|
||||
let stdout_a = unsafe { std::fs::File::from_raw_fd(fd_a_write) };
|
||||
let stdout_b = unsafe { std::fs::File::from_raw_fd(fd_b_write) };
|
||||
|
||||
compression_engine_a.cat(item_path_a.clone())?;
|
||||
compression_engine_b.cat(item_path_b.clone())?;
|
||||
|
||||
Reference in New Issue
Block a user