fix: resolve compilation errors by adding Sync+Send bounds and fixing syntax

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-11 11:57:14 -03:00
parent 4dcbb7c942
commit dca1d6c6a4
5 changed files with 35 additions and 23 deletions

View File

@@ -24,11 +24,6 @@ impl CompressionEngine for CompressionEngineNone {
("<INTERNAL>".to_string(), "".to_string(), "".to_string())
}
fn size(&self, file_path: PathBuf) -> Result<usize> {
let item_file_metadata = file_path.metadata()?;
Ok(item_file_metadata.len() as usize)
}
fn open(&self, file_path: PathBuf) -> Result<Box<dyn Read>> {
debug!("COMPRESSION: Opening {:?} using {:?}", file_path, *self);
Ok(Box::new(File::open(file_path)?))
@@ -38,4 +33,8 @@ impl CompressionEngine for CompressionEngineNone {
debug!("COMPRESSION: Writing to {:?} using {:?}", file_path, *self);
Ok(Box::new(File::create(file_path)?))
}
fn clone_box(&self) -> Box<dyn CompressionEngine> {
Box::new(self.clone())
}
}

View File

@@ -161,7 +161,7 @@ impl CompressionEngine for CompressionEngineProgram {
}))
}
fn clone_box(&self) -> Box<dyn CompressionEngine + Send + Sync> {
fn clone_box(&self) -> Box<dyn CompressionEngine> {
Box::new(self.clone())
}
}