Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
vaivaswatha committed Apr 6, 2024
1 parent 9432c37 commit 2bce7ed
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions sway-core/src/ir_generation/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,13 @@ impl<'eng> FnCompiler<'eng> {
_ => return Ok(TerminatorValue::new(val, context)),
};

let is_argument =
if let ty::TyExpressionVariant::VariableExpression { name, .. } = &ast_expr.expression {
self.function.get_arg(context, name.as_str()).is_some()
} else {
false
};
let is_argument = if let ty::TyExpressionVariant::VariableExpression { name, .. } =
&ast_expr.expression
{
self.function.get_arg(context, name.as_str()).is_some()
} else {
false
};

let ptr_val = if is_argument {
// The `ptr_to_int` instructions gets the address of a variable into an integer.
Expand Down

0 comments on commit 2bce7ed

Please sign in to comment.