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

Revert "Put single-expression functions on a single line" #442

Merged
merged 1 commit into from Feb 27, 2022

Conversation

mgeisler
Copy link
Owner

This reverts commit 4ce32d6.

Changing the default formatting using an unstable rustfmt feature
was a bad idea: it means that people who have auto-formatting turned
on (like me) will see the formatting flip-flop when switching between
stable and nightly.

The problem is that the unstable fn_single_line option only takes
effect on nightly, so when rustfmt runs on stable, it will add lots
of spurious changes.

The imports_granularity option does not have this problem: rustfmt
will not modify imports by default and so nothing happens when it is
run on stable.

This reverts commit 4ce32d6.

Changing the default formatting using an unstable `rustfmt` feature
was a bad idea: it means that people who have auto-formatting turned
on (like me) will see the formatting flip-flop when switching between
stable and nightly.

The problem is that the unstable `fn_single_line` option only takes
effect on nightly, so when `rustfmt` runs on stable, it will add lots
of spurious changes.

The `imports_granularity` option does not have this problem: `rustfmt`
will not modify imports by default and so nothing happens when it is
run on stable.
@mgeisler mgeisler merged commit 59c9fb3 into master Feb 27, 2022
@mgeisler mgeisler deleted the revert-single-expr-functions branch February 27, 2022 13:56
@github-actions github-actions bot mentioned this pull request Feb 27, 2022
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.

None yet

1 participant