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

Better formatting? #51

Merged
merged 7 commits into from
Oct 10, 2024
Merged

Better formatting? #51

merged 7 commits into from
Oct 10, 2024

Conversation

dvdplm
Copy link
Contributor

@dvdplm dvdplm commented Oct 7, 2024

Add a rustfmt.toml and set max_width = 120 (default: 100) and use_small_heuristics = "Max"

I made a few variants for comparison:

  • #31c9c8d: max_width = 120 + use_small_heuristics = "Max"
  • 3beec30: max_width = 120 + use_small_heuristics = "Default"
  • afcf61d: max_width = 100 + use_small_heuristics = "Max

I committed my personal preference as the last one: 120 width and default heuristics.

dvdplm added 2 commits October 7, 2024 10:02
Set max_width = 120 (default: 100)
Set use_small_heuristics = "Max"
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.37%. Comparing base (d4941e9) to head (b6c4413).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   99.34%   99.37%   +0.02%     
==========================================
  Files           9        9              
  Lines        1382     1285      -97     
==========================================
- Hits         1373     1277      -96     
+ Misses          9        8       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rustfmt.toml Outdated Show resolved Hide resolved
@fjarri
Copy link
Member

fjarri commented Oct 7, 2024

Yes, of these three I think I prefer the 120 width and default heuristics variant too.

I have some reluctance towards going against the all default settings, but line length is really the least obtrusive one.

@dvdplm dvdplm marked this pull request as ready for review October 8, 2024 08:47
@dvdplm
Copy link
Contributor Author

dvdplm commented Oct 8, 2024

We should probably merge this when the other PRs are all merged.

@fjarri
Copy link
Member

fjarri commented Oct 8, 2024

Ok, let's do that.

@dvdplm dvdplm merged commit b7158da into master Oct 10, 2024
13 checks passed
@dvdplm dvdplm deleted the dp-rustfmt branch October 10, 2024 10:32
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.

2 participants