Skip to content

Commit cf08c3a

Browse files
committed
cargo fmt and removed debug statements
1 parent e8a1867 commit cf08c3a

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/moveir/preprocessor/mod.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -907,17 +907,25 @@ impl Visitor for MovePreProcessor {
907907
|| call.identifier.token.as_str() == FLINT_GLOBAL_ARRAY_LENGTH
908908
{
909909
let array_argument = &call.arguments.first().unwrap().expression;
910-
let type_id = if let Some(enclosing_type) = &call.identifier.enclosing_type.as_ref() {
910+
let type_id = if let Some(enclosing_type) = &call.identifier.enclosing_type.as_ref()
911+
{
911912
enclosing_type
912913
} else {
913914
""
914915
};
915916

916-
let expr_type = ctx.environment.get_expression_type(&array_argument, type_id, &[], &[], &ctx.scope_context.as_ref().unwrap_or_default());
917+
let expr_type = ctx.environment.get_expression_type(
918+
&array_argument,
919+
type_id,
920+
&[],
921+
&[],
922+
&ctx.scope_context.as_ref().unwrap_or_default(),
923+
);
917924

918925
if let Type::InoutType(i) = expr_type {
919926
if let Type::ArrayType(a) = *i.key_type {
920-
call.identifier.token = mangle_array_runtime_function(&call.identifier.token, &*a.key_type);
927+
call.identifier.token =
928+
mangle_array_runtime_function(&call.identifier.token, &*a.key_type);
921929
}
922930
}
923931
}
@@ -1453,6 +1461,6 @@ fn generate_move_type(elem_type: &Type) -> String {
14531461
Type::ArrayType(a) => format!("vector<{}>", generate_move_type(&a.key_type)),
14541462
Type::UserDefinedType(t) => t.token.clone(),
14551463
Type::Bool => "bool".to_string(),
1456-
_ => unimplemented!()
1464+
_ => unimplemented!(),
14571465
}
14581466
}

src/moveir/preprocessor/utils.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,6 @@ pub fn pre_assign(
642642
}
643643
};
644644

645-
dbg!(declaration.clone());
646-
dbg!(expression.clone());
647645
if struct_is_mutable_reference(&mut expression, &temp_identifier, ctx) {
648646
ctx.pre_statements
649647
.push(Statement::Expression(Expression::BinaryExpression(

0 commit comments

Comments
 (0)