From e9afb32c9513323d9f579d2ed51605292dfaba3c Mon Sep 17 00:00:00 2001 From: arty Date: Wed, 11 Sep 2024 13:34:12 -0700 Subject: [PATCH] Revert "Too aggressive clippy" This reverts commit 55c220873a03c5fd98934df14a522fd30aeb70c9. --- src/classic/clvm_tools/cmds.rs | 3 +-- src/classic/clvm_tools/stages/stage_2/compile.rs | 3 +-- src/classic/clvm_tools/stages/stage_2/optimize.rs | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/classic/clvm_tools/cmds.rs b/src/classic/clvm_tools/cmds.rs index 8df31f92f..e0f3097d7 100644 --- a/src/classic/clvm_tools/cmds.rs +++ b/src/classic/clvm_tools/cmds.rs @@ -1165,10 +1165,9 @@ pub fn launch_tool(stdout: &mut Stream, args: &[String], tool_name: &str, defaul }), _ => None, }) - .map(|st| { + .inspect(|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 27d8c3f04..64b367c4d 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).map(|x| { + do_com_prog_(allocator, prog, macro_lookup, symbol_table, run_program).inspect(|x| { if DIAG_OUTPUT { println!( "DO_COM_PROG {}: {} MACRO {} SYMBOLS {} RESULT {}", @@ -610,7 +610,6 @@ 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 c3c7d2fa7..f48d2a143 100644 --- a/src/classic/clvm_tools/stages/stage_2/optimize.rs +++ b/src/classic/clvm_tools/stages/stage_2/optimize.rs @@ -737,15 +737,14 @@ pub fn optimize_sexp( if DIAG_OPTIMIZATIONS { println!("START OPTIMIZE {}", disassemble(allocator, r, None)); } - optimize_sexp_(allocator, &optimized, r, eval_f).map(|x| { + optimize_sexp_(allocator, &optimized, r, eval_f).inspect(|x| { if DIAG_OPTIMIZATIONS { println!( "OPTIMIZE_SEXP {} GIVING {}", disassemble(allocator, r, None), - disassemble(allocator, x, None) + disassemble(allocator, *x, None) ); } - x }) }