remove test code, fmt

This commit is contained in:
Martin Kavík 2024-05-28 17:18:56 +02:00
parent 920c5b5f93
commit 95b4cab739
3 changed files with 36 additions and 78 deletions

View file

@ -1,5 +1,5 @@
use std::sync::Mutex;
use std::rc::Rc;
use std::sync::Mutex;
use wellen::simple::Waveform;
mod wellen_helpers;
@ -16,12 +16,12 @@ fn show_window(window: tauri::Window) {
#[tauri::command(rename_all = "snake_case")]
fn load_waveform(test_file_name: Rc<String>, store: tauri::State<Store>) {
static SIMPLE_VCD: &'static[u8; 311] = include_bytes!("../../test_files/simple.vcd");
static WAVE_27_FST: &'static[u8; 28860652] = include_bytes!("../../test_files/wave_27.fst");
static SIMPLE_VCD: &'static [u8; 311] = include_bytes!("../../test_files/simple.vcd");
static WAVE_27_FST: &'static [u8; 28860652] = include_bytes!("../../test_files/wave_27.fst");
let chosen_file = match test_file_name.as_str() {
"simple.vcd" => SIMPLE_VCD.to_vec(),
"wave_27.fst" => WAVE_27_FST.to_vec(),
test_file_name => todo!("add {test_file_name} to the `test_files` folder")
test_file_name => todo!("add {test_file_name} to the `test_files` folder"),
};
let waveform = wellen_helpers::read_from_bytes(chosen_file);
let Ok(waveform) = waveform else {