From 30ce1ad4bb98d0df6fff4df2a3ede508ba9c87f6 Mon Sep 17 00:00:00 2001 From: Folkert Date: Fri, 9 Dec 2022 15:57:50 +0100 Subject: [PATCH] cleanup --- crates/compiler/alias_analysis/src/lib.rs | 41 +++++++++-------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/crates/compiler/alias_analysis/src/lib.rs b/crates/compiler/alias_analysis/src/lib.rs index a3f3e15f86..49ea2025ed 100644 --- a/crates/compiler/alias_analysis/src/lib.rs +++ b/crates/compiler/alias_analysis/src/lib.rs @@ -267,22 +267,22 @@ where captures_niche: CapturesNiche::no_niche(), }; - let mut env = Env::new(arena); - let host_exposed: Vec<_> = symbols .iter() .map(|symbol| { - let bytes = func_name_bytes_help( - *symbol, - [], - CapturesNiche::no_niche(), - &layout.result, - ); - - (bytes, [].as_slice()) + ( + func_name_bytes_help( + *symbol, + [], + CapturesNiche::no_niche(), + &layout.result, + ), + [].as_slice(), + ) }) .collect(); + let mut env = Env::new(arena); let entry_point_function = build_entry_point(&mut env, interner, layout, None, &host_exposed)?; @@ -327,22 +327,11 @@ where let mut p = ProgramBuilder::new(); p.add_mod(MOD_APP, main_module)?; - match entry_point { - EntryPoint::Single { .. } => { - p.add_entry_point( - EntryPointName(ENTRY_POINT_NAME), - MOD_APP, - FuncName(ENTRY_POINT_NAME), - )?; - } - EntryPoint::Expects { .. } => { - p.add_entry_point( - EntryPointName(ENTRY_POINT_NAME), - MOD_APP, - FuncName(ENTRY_POINT_NAME), - )?; - } - } + p.add_entry_point( + EntryPointName(ENTRY_POINT_NAME), + MOD_APP, + FuncName(ENTRY_POINT_NAME), + )?; p.build()? };