refactor: add copy method to CompressionEngine and update mode_diff to use it
This commit is contained in:
@@ -535,8 +535,11 @@ fn mode_diff(cmd: &mut Command, args: Args, ids: &mut Vec<i64>, tags: &mut Vec<S
|
||||
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())?;
|
||||
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) };
|
||||
|
||||
compression_engine_a.copy(item_path_a.clone(), &mut stdout_a)?;
|
||||
compression_engine_b.copy(item_path_b.clone(), &mut stdout_b)?;
|
||||
|
||||
let output = child.wait_with_output().expect("Failed to wait on diff command");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user