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

Tweak rustfmt config #109

Merged
merged 4 commits into from
Jan 10, 2024
Merged

Tweak rustfmt config #109

merged 4 commits into from
Jan 10, 2024

Conversation

dbrgn
Copy link
Owner

@dbrgn dbrgn commented Jan 10, 2024

See commit messages 🙂

@newAM Do you agree with adding unstable rustfmt options?

@dbrgn dbrgn requested a review from newAM January 10, 2024 20:42
@dbrgn dbrgn self-assigned this Jan 10, 2024
Copy link
Collaborator

@newAM newAM left a comment

Choose a reason for hiding this comment

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

I'm ok with nightly rustfmt features, I really like format_code_in_doc_comments myself.

dbrgn added 4 commits January 10, 2024 22:19
For some reason, we ended up with both a rustfmt.toml and a
.rustfmt.toml file. Remove one of them.
The option will merge multiple imports from the same crate. Since it
isn't yet stabilized, we need to run `cargo +nightly fmt` to reformat
code.

Running it on stable will print a warning, but formatting will work
nevertheless (just without import merging).
I did this by temporarily adding `format_code_in_doc_comments = true` to
the rustfmt config and applying the reformatting. Then, I added all
chunks that didn't somehow mangle the formatting of the expectation
arrays.
@dbrgn
Copy link
Owner Author

dbrgn commented Jan 10, 2024

@newAM I updated the PR again!

  • Added group_imports option as well
  • Reformatted documentation examples

@dbrgn dbrgn requested a review from newAM January 10, 2024 21:36
@dbrgn dbrgn merged commit 53f7d86 into main Jan 10, 2024
3 checks passed
@newAM newAM deleted the rustfmt branch January 11, 2024 03:36
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