mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-15 17:44:25 +08:00
Impl better to_data for some archive entry
This commit is contained in:
@@ -197,6 +197,7 @@ impl<'b, T: Read + Seek + Debug + Send + Sync + 'b> Script for ExHibitGrpArchive
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct GrpEntry<T: Read + Seek> {
|
||||
info: GrpFileEntry,
|
||||
reader: Arc<Mutex<T>>,
|
||||
@@ -217,10 +218,13 @@ impl<T: Read + Seek> GrpEntry<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Read + Seek> ArchiveContent for GrpEntry<T> {
|
||||
impl<T: Read + Seek + std::fmt::Debug + Send + Sync> ArchiveContent for GrpEntry<T> {
|
||||
fn name(&self) -> &str {
|
||||
&self.info.name
|
||||
}
|
||||
fn to_data<'a>(&'a mut self) -> Result<Box<dyn ReadSeek + Send + Sync + 'a>> {
|
||||
Ok(Box::new(self))
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Read + Seek> Read for GrpEntry<T> {
|
||||
|
||||
Reference in New Issue
Block a user