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

Format strings #446

Merged
merged 1 commit into from
May 25, 2020
Merged

Format strings #446

merged 1 commit into from
May 25, 2020

Conversation

eduardosm
Copy link
Collaborator

Otherwise, when there were long strings, rustfmt was skipping the whole block.

Used:

cargo fmt -- --config format_strings=true

Otherwise, when there were long strings, rustfmt was skipping the whole block.

Used:
```
cargo fmt -- --config format_strings=true
```
Copy link
Owner

@psychon psychon left a comment

Choose a reason for hiding this comment

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

Do we need to drop a file somewhere with configuration for rustfmt to always enable this?

@mergify mergify bot merged commit aaa06aa into master May 25, 2020
@mergify mergify bot deleted the long-strings branch May 25, 2020 11:34
@eduardosm
Copy link
Collaborator Author

Options can be set in a file named rustfmt.toml. Note that, like the format_code_in_doc_comments, the format_strings options is "unstable" (rust-lang/rustfmt#3353). I believe that this means that the behavior might change. So, for now I'd just do a one-time run when we spot something wrong.

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