fix: Implement clone_box for CompressionEngineProgram

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-11 11:32:05 -03:00
parent a23cf1bf3b
commit b151998144

View File

@@ -81,6 +81,18 @@ impl CompressionEngine for CompressionEngineProgram {
self.supported self.supported
} }
fn is_internal(&self) -> bool {
false
}
fn get_status_info(&self) -> (String, String, String) {
(
self.program.clone(),
self.compress.join(" "),
self.decompress.join(" "),
)
}
fn open(&self, file_path: PathBuf) -> Result<Box<dyn Read>> { fn open(&self, file_path: PathBuf) -> Result<Box<dyn Read>> {
debug!("COMPRESSION: Opening {:?} using {:?}", file_path, *self); debug!("COMPRESSION: Opening {:?} using {:?}", file_path, *self);
@@ -148,4 +160,8 @@ impl CompressionEngine for CompressionEngineProgram {
stdin: Some(stdin), stdin: Some(stdin),
})) }))
} }
fn clone_box(&self) -> Box<dyn CompressionEngine + Send + Sync> {
Box::new(self.clone())
}
} }