Skip to content

Commit

Permalink
chore: format submodule/contract (#3286)
Browse files Browse the repository at this point in the history
  • Loading branch information
kek kek kek authored and guipublic committed Oct 26, 2023
1 parent f31da68 commit 85a4ed3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tooling/nargo_fmt/src/visitor/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl FmtVisitor<'_> {

self.format_if(*if_expr)
}
ExpressionKind::Variable(_) | ExpressionKind::Lambda(_) => self.slice(span).to_string(),
ExpressionKind::Lambda(_) | ExpressionKind::Variable(_) => self.slice(span).to_string(),
ExpressionKind::Error => unreachable!(),
}
}
Expand Down
4 changes: 3 additions & 1 deletion tooling/nargo_fmt/src/visitor/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ impl super::FmtVisitor<'_> {

self.push_rewrite(constrain, span);
}
StatementKind::Assign(_) | StatementKind::For(_) => self.format_missing(span.end()),
StatementKind::For(_) | StatementKind::Assign(_) => {
self.push_rewrite(self.slice(span).to_string(), span);
}
StatementKind::Error => unreachable!(),
}

Expand Down

0 comments on commit 85a4ed3

Please sign in to comment.