Make generic over readers

This commit is contained in:
TheZoq2 2023-01-09 18:45:10 +01:00
parent bc73db5dba
commit 79300afd43
6 changed files with 24 additions and 22 deletions

View file

@ -11,7 +11,7 @@ mod scopes;
mod events;
pub fn parse_vcd(file: File) -> Result<super::types::VCD, String> {
pub fn parse_vcd(file: impl std::io::Read) -> Result<super::types::VCD, String> {
let mut word_gen = super::reader::WordReader::new(file);
let header = metadata::parse_metadata(&mut word_gen)?;