impl Send + Sync mark for archive extract API (#12)

This commit is contained in:
2026-04-13 15:35:01 +08:00
parent 034f4f7a52
commit 4f7d696dbe
21 changed files with 96 additions and 78 deletions

View File

@@ -159,7 +159,7 @@ impl<'b, T: Read + Seek + Debug + 'b> ExHibitGrpArchive<'b, T> {
}
}
impl<'b, T: Read + Seek + Debug + 'b> Script for ExHibitGrpArchive<'b, T> {
impl<'b, T: Read + Seek + Debug + Send + Sync + 'b> Script for ExHibitGrpArchive<'b, T> {
fn default_output_script_type(&self) -> OutputScriptType {
OutputScriptType::Json
}
@@ -184,7 +184,7 @@ impl<'b, T: Read + Seek + Debug + 'b> Script for ExHibitGrpArchive<'b, T> {
Ok(Box::new(self.entries.iter().map(|entry| Ok(entry.offset))))
}
fn open_file<'a>(&'a self, index: usize) -> Result<Box<dyn ArchiveContent + 'a>> {
fn open_file<'a>(&'a self, index: usize) -> Result<Box<dyn ArchiveContent + Send + Sync + 'a>> {
if index >= self.entries.len() {
return Err(anyhow::anyhow!(
"Index out of bounds: {} (max: {}).",