From 77c681514e44244e09d4df276d482417c504d4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Wed, 19 Feb 2025 17:02:20 -0300 Subject: [PATCH] Improve readibility --- src/compiler.rs | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/compiler.rs b/src/compiler.rs index b997cb30c..9f29af765 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -399,26 +399,22 @@ fn compile_func( 0, ); - values.push(( - ¶m.id, - ( - ¶m.ty, - if type_info.is_builtin() && type_info.is_zst(registry)? { - pre_entry_block - .append_operation(llvm::undef( - type_info.build(context, module, registry, metadata, ¶m.ty)?, - location, - )) - .result(0)? - .into() - } else { - let value = entry_block.argument(count)?.into(); - count += 1; + let value = if type_info.is_builtin() && type_info.is_zst(registry)? { + pre_entry_block + .append_operation(llvm::undef( + type_info.build(context, module, registry, metadata, ¶m.ty)?, + location, + )) + .result(0)? + .into() + } else { + let value = entry_block.argument(count)?.into(); + count += 1; - value - }, - ), - )); + value + }; + + values.push((¶m.id, (¶m.ty, value))); } values.into_iter()