From 97b995904b76b86923a1ec227c37344f6e2fbfe4 Mon Sep 17 00:00:00 2001 From: philogy Date: Wed, 6 Nov 2024 03:38:36 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=A2=20Clippy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cli/src/main.rs | 1 - crates/compilation/src/lib.rs | 14 +++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) 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 {