diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index f7d0e59..0f18b3b 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -1,6 +1,5 @@ use ariadne::{sources, Color, Config, Fmt, IndexType, Label, Report, ReportKind}; use clap::Parser as ClapParser; -use evm_glue::{assemble_maximized, assemble_minimized, utils::MarkTracker}; use huff_analysis::*; use huff_ast::{parse, RootSection}; use huff_compilation::{generate_default_constructor, generate_for_entrypoint, CompileGlobals}; diff --git a/crates/compilation/src/lib.rs b/crates/compilation/src/lib.rs index 85abbc4..8cae2fe 100644 --- a/crates/compilation/src/lib.rs +++ b/crates/compilation/src/lib.rs @@ -140,7 +140,7 @@ fn generate_for_macro<'src: 'cmp, 'cmp>( }; generate_for_macro( globals, - &target, + target, args.0 .iter() .map(|arg| instruction_to_asm(globals, ¤t_args, label_stack, arg)) @@ -152,10 +152,8 @@ fn generate_for_macro<'src: 'cmp, 'cmp>( ) } Invoke::BuiltinCodeSize(code_ref) => { - let mref: MarkRef = if let Some(included) = included_macros - .iter() - .filter(|m| m.name == code_ref.ident()) - .next() + let mref: MarkRef = if let Some(included) = + included_macros.iter().find(|m| m.name == code_ref.ident()) { included.size_ref() } else { @@ -173,10 +171,8 @@ fn generate_for_macro<'src: 'cmp, 'cmp>( asm.push(Asm::Ref(mref)); } Invoke::BuiltinCodeOffset(code_ref) => { - let mref: MarkRef = if let Some(included) = included_macros - .iter() - .filter(|m| m.name == code_ref.ident()) - .next() + let mref: MarkRef = if let Some(included) = + included_macros.iter().find(|m| m.name == code_ref.ident()) { included.start_ref() } else {