diff --git a/src/classic/clvm_tools/cmds.rs b/src/classic/clvm_tools/cmds.rs index e0f3097d7..8df31f92f 100644 --- a/src/classic/clvm_tools/cmds.rs +++ b/src/classic/clvm_tools/cmds.rs @@ -1165,9 +1165,10 @@ pub fn launch_tool(stdout: &mut Stream, args: &[String], tool_name: &str, defaul }), _ => None, }) - .inspect(|st| { + .map(|st| { emit_symbol_output = true; symbol_table = Some(st.clone()); + st }); if let Some(ArgumentValue::ArgBool(true)) = parsed_args.get("verbose") { diff --git a/src/classic/clvm_tools/stages/stage_2/compile.rs b/src/classic/clvm_tools/stages/stage_2/compile.rs index 64b367c4d..27d8c3f04 100644 --- a/src/classic/clvm_tools/stages/stage_2/compile.rs +++ b/src/classic/clvm_tools/stages/stage_2/compile.rs @@ -599,7 +599,7 @@ pub fn do_com_prog( disassemble(allocator, symbol_table, None), ); } - do_com_prog_(allocator, prog, macro_lookup, symbol_table, run_program).inspect(|x| { + do_com_prog_(allocator, prog, macro_lookup, symbol_table, run_program).map(|x| { if DIAG_OUTPUT { println!( "DO_COM_PROG {}: {} MACRO {} SYMBOLS {} RESULT {}", @@ -610,6 +610,7 @@ pub fn do_com_prog( disassemble(allocator, x.1, None) ); } + x }) } diff --git a/src/classic/clvm_tools/stages/stage_2/optimize.rs b/src/classic/clvm_tools/stages/stage_2/optimize.rs index f48d2a143..c3c7d2fa7 100644 --- a/src/classic/clvm_tools/stages/stage_2/optimize.rs +++ b/src/classic/clvm_tools/stages/stage_2/optimize.rs @@ -737,14 +737,15 @@ pub fn optimize_sexp( if DIAG_OPTIMIZATIONS { println!("START OPTIMIZE {}", disassemble(allocator, r, None)); } - optimize_sexp_(allocator, &optimized, r, eval_f).inspect(|x| { + optimize_sexp_(allocator, &optimized, r, eval_f).map(|x| { if DIAG_OPTIMIZATIONS { println!( "OPTIMIZE_SEXP {} GIVING {}", disassemble(allocator, r, None), - disassemble(allocator, *x, None) + disassemble(allocator, x, None) ); } + x }) }