-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: formatting for loop #6807
fix: formatting for loop #6807
Conversation
541d14f
to
7d17d50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice; tested and seems to be working 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't solve the issue.
There is already white space added after the for
keyword so this change just pads more white space.
Locking this while I look into it.
I manually tested switching to the PR branch to validate. |
This looks like a parser error. If we take the example for from the linked issue and run it we get a parser error. @IGI-111 any idea why the parser would be failing here? #[test]
fn contract_for_loop() {
check(
indoc! {r#"
contract;
abi MyContract {
fn test_function() -> bool;
}
impl MyContract for Contract {
fn test_function() -> bool {
let mut my_vec: Vec<u64> = Vec::new();
for iter in my_vec.iter() {
}
true
}
}
"#},
indoc! {r#"
contract;
abi MyContract {
fn test_function() -> bool;
}
impl MyContract for Contract {
fn test_function() -> bool {
let mut my_vec: Vec<u64> = Vec::new();
for iter in my_vec.iter() {
}
true
}
}
"#},
);
}
|
@JoshuaBatty thanks for the review! The issue isn't with adding a space after the for iter in my_vec.iter() {
} as if it was written like: for iterin my_vec.iter() {
} |
Fixing the |
319c05c
to
0a827e2
Compare
Seems like we have couple conflicts @amiremohamadi before we can continue running the CI |
0a827e2
to
4911cf8
Compare
@kayagokalp rebased my changes |
Description
Fix #6804
Checklist
Breaking*
orNew Feature
labels where relevant.