Skip to content
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 new lines into empty implementation #5176

Merged
merged 5 commits into from
Oct 12, 2023
Merged

Conversation

cr-fuel
Copy link
Contributor

@cr-fuel cr-fuel commented Oct 8, 2023

Fixes #5060

Description

Empty implementations have a bug with new lines

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@cr-fuel cr-fuel requested review from sdankel, eureka-cpu and a team October 8, 2023 06:19
@cr-fuel cr-fuel self-assigned this Oct 8, 2023
swayfmt/src/items/item_impl/mod.rs Outdated Show resolved Hide resolved
@cr-fuel cr-fuel enabled auto-merge (squash) October 9, 2023 22:25
Empty implementations have a bug with new lines
Instead call truncate
@cr-fuel cr-fuel force-pushed the cr-fuel/fmt-impl-empty-line branch from b1f82f4 to a8b8e03 Compare October 11, 2023 05:25
@cr-fuel cr-fuel requested review from JoshuaBatty, eureka-cpu and a team October 11, 2023 05:25
swayfmt/src/items/item_fn/mod.rs Show resolved Hide resolved
@cr-fuel cr-fuel requested a review from a team October 11, 2023 21:16
@cr-fuel cr-fuel requested review from a team and sdankel October 12, 2023 00:36
Copy link
Contributor

@eureka-cpu eureka-cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, nice work!

@cr-fuel cr-fuel merged commit bf08373 into master Oct 12, 2023
31 checks passed
@cr-fuel cr-fuel deleted the cr-fuel/fmt-impl-empty-line branch October 12, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formatter adds newline inside empty impl block
4 participants