fix some errors/typos and prep for refactoring

This commit is contained in:
Yehowshua Immanuel 2022-10-25 21:09:19 -04:00
parent d5db622db3
commit 6abcd7ce32
4 changed files with 30 additions and 54 deletions

View file

@ -2,7 +2,6 @@
// This program is distributed under both the GPLV3 license
// and the YEHOWSHUA license, both of which can be found at
// the root of the folder containing the sources for this program.
use num::Zero;
use super::*;
@ -13,7 +12,6 @@ pub(super) fn parse_events<'a>(
) -> Result<(), String> {
let mut curr_tmstmp_lsb_idx = 0u32;
let mut curr_tmstmp_len_u8 = 0u8;
let mut curr_time = BigUint::zero();
loop {
let next_word = word_reader.next_word();
@ -42,7 +40,6 @@ pub(super) fn parse_events<'a>(
"Error near {f}:{l}. Failed to parse {value} as BigInt at {cursor:?}"
)
})?;
curr_time = value.clone();
let mut value = value.to_bytes_le();
// TODO : u32 helps with less memory, but should ideally likely be
// configurable.
@ -422,7 +419,6 @@ pub(super) fn parse_events<'a>(
ref mut signal_error,
num_bits,
string_vals,
byte_len_of_num_tmstmp_vals_on_tmln,
byte_len_of_string_tmstmp_vals_on_tmln,
lsb_indxs_of_string_tmstmp_vals_on_tmln,
..
@ -497,12 +493,8 @@ pub(super) fn parse_events<'a>(
match signal {
Signal::Data {
name,
sig_type,
ref mut signal_error,
num_bits,
string_vals,
byte_len_of_num_tmstmp_vals_on_tmln,
byte_len_of_string_tmstmp_vals_on_tmln,
lsb_indxs_of_string_tmstmp_vals_on_tmln,
..