Skip to content

Conversation

@stepancheg
Copy link
Contributor

@stepancheg stepancheg commented Jan 17, 2026

Consider adopting imports_granularity=Item nightly rustfmt option.

Merge conflicts are much easier to resolve when one import per line is used. Consider adopting unstable option imports_granularity=Item.

rust-lang/rustfmt#4991

Although the option is unstable, some used for a long time mostly without problems. For example, Meta https://github.com/facebook/buck2/blob/main/rustfmt.toml

@stepancheg stepancheg force-pushed the imports-granularity branch 3 times, most recently from 5aa685b to e755b5f Compare January 17, 2026 20:58
@stepancheg stepancheg marked this pull request as ready for review January 17, 2026 21:13
Merge conflicts are much easier to resolve when one import per line
is used.  Consider adopting unstable option imports_granularity=Item.

rust-lang/rustfmt#4991
@cberner
Copy link
Owner

cberner commented Jan 17, 2026

Oh cool. Ya, this seems like a good setting. Too bad it's unstable, but I can live with that since it's just rustfmt

@cberner
Copy link
Owner

cberner commented Jan 17, 2026

Oops. Clicked the wrong button. This is now merged to master

@cberner cberner closed this Jan 17, 2026
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