mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 11:12:48 +03:00
formatting
This commit is contained in:
parent
c37eeaae03
commit
f3f98ac30e
@ -60,12 +60,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<Symbol, &Struct> = program_scope.structs.iter().map(|(name, struct_)| {
|
||||
(
|
||||
*name,
|
||||
struct_
|
||||
)
|
||||
}).collect();
|
||||
let structs_map: IndexMap<Symbol, &Struct> =
|
||||
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(
|
||||
@ -74,7 +70,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(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user