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:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user