From 00105b9641f9b90168718c4f639f69dfc056e79a Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Tue, 3 Oct 2023 16:12:57 -0700 Subject: [PATCH] formatting --- compiler/passes/src/code_generation/visit_program.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/compiler/passes/src/code_generation/visit_program.rs b/compiler/passes/src/code_generation/visit_program.rs index 208cfba365..df84f6d5e8 100644 --- a/compiler/passes/src/code_generation/visit_program.rs +++ b/compiler/passes/src/code_generation/visit_program.rs @@ -58,12 +58,8 @@ impl<'a> CodeGenerator<'a> { let order = self.struct_graph.post_order().unwrap(); // Create a mapping of symbols to references of structs so can perform constant-time lookups. - let structs_map: IndexMap = program_scope.structs.iter().map(|(name, struct_)| { - ( - *name, - struct_ - ) - }).collect(); + let structs_map: IndexMap = + program_scope.structs.iter().map(|(name, struct_)| (*name, struct_)).collect(); // Visit each `Struct` or `Record` in the post-ordering and produce an Aleo struct or record. program_string.push_str( @@ -72,7 +68,7 @@ impl<'a> CodeGenerator<'a> { .map(|name| { match structs_map.get(&name) { // If the struct is found, it is a local struct. - Some(struct_) => self.visit_struct_or_record(*struct_), + Some(struct_) => self.visit_struct_or_record(struct_), // If the struct is not found, it is an imported struct. None => String::new(), }