diff --git a/crates/replay_gen/src/lib.rs b/crates/replay_gen/src/lib.rs index a84a105b..51817a69 100644 --- a/crates/replay_gen/src/lib.rs +++ b/crates/replay_gen/src/lib.rs @@ -9,11 +9,11 @@ mod tests { use crate::{ codegen::generate_javascript, irgen::IRGenerator, opt::merge_fn_results, - trace::decode_trace, + trace::encode_trace, }; #[test] - fn trace_encode_decode_same() -> std::io::Result<()> { + fn trace_decode_encode_same() -> std::io::Result<()> { use super::*; use std::fs; use std::io; @@ -53,10 +53,10 @@ mod tests { trace.push(event); } let mut newfile = tempfile()?; - let trace_str = match decode_trace(trace) { + let trace_str = match encode_trace(trace) { Ok(s) => s, Err(e) => { - println!("error decoding trace: {}", e); + println!("error encoding trace: {}", e); continue; } }; diff --git a/crates/replay_gen/src/trace.rs b/crates/replay_gen/src/trace.rs index efd48d33..54835558 100644 --- a/crates/replay_gen/src/trace.rs +++ b/crates/replay_gen/src/trace.rs @@ -72,7 +72,7 @@ pub enum WasmEvent { }, } -pub fn decode_trace(trace: Trace) -> Result { +pub fn encode_trace(trace: Trace) -> Result { let mut s = String::new(); for event in trace { write!(&mut s, "{:?}\n", event)?;