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
Tidy: Fix ordering use statements with braces #13205
Conversation
Heads up! This PR modifies the following files:
|
It's actually a nice hack, so to speak. Will look at the entire PR later today! :) |
if prev_use: | ||
current_use_cut = current_use.replace("{self,", ".").replace("{", ".") | ||
prev_use_cut = prev_use.replace("{self,", ".").replace("{", ".") | ||
if indent == current_indent and prev_use and current_use_cut < prev_use_cut: |
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.
Maybe just merge this into the previous block as
if indent == current_indent and current_use_cut < prev_use_cut:
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.
done
The changes look good! r+ after addressing my comment. And, while you are at it, can you please change your commit message? "Fix tidy" looks rather confusing, since it doesn't actually fix tidy. It fixes the sorting of |
424c547
to
3984039
Compare
done. |
Thanks! :) @bors-servo r+ |
📌 Commit 3984039 has been approved by |
☔ The latest upstream changes (presumably #13058) made this pull request unmergeable. Please resolve the merge conflicts. |
Sorry I didn't prioritize this first. Please rebase it this once, and I'll make sure it lands first! :) |
@bors-servo p=129358 |
rebased. |
@bors-servo r+ |
📌 Commit 93a103b has been approved by |
Looks like this is next to #13193. We can only hope that the other PR doesn't break yours. |
@bors-servo r+ p=1231451 force |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 93a103b has been approved by |
Tidy: Fix ordering use statements with braces This hack fixes #7412 and matches behavior with rustfmt. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13205) <!-- Reviewable:end -->
Yay! There we go! 😄 |
☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
Now, we've broken everything 😐 |
This hack fixes #7412 and matches behavior with rustfmt.
This change is