Skip to content

Conversation

ojeda
Copy link
Member

@ojeda ojeda commented Jan 20, 2022

rustfmt (in its default config, at least) does not add a comma
in the last feature of the list, which means diffs are bigger at times.

In addition, this is how the standard library does it, and one
may argue it allows for easier greping too.

Link: #439 (comment).

Indirectly-suggested-by: Benoit de Chezelles [email protected]
Signed-off-by: Miguel Ojeda [email protected]

`rustfmt` (in its default config, at least) does not add a comma
in the last feature of the list, which means diffs are bigger at times.

In addition, this is how the standard library does it, and one
may argue it allows for easier `grep`ing too.

Link: Rust-for-Linux#439 (comment).

Indirectly-suggested-by: Benoit de Chezelles <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

The same style is used in the rust repo.

@ojeda
Copy link
Member Author

ojeda commented Jan 20, 2022

Thanks @bjorn3 for the review as usual! Yeah, exactly.

@ojeda ojeda merged commit 90965d5 into Rust-for-Linux:rust Jan 20, 2022
@ojeda ojeda deleted the fmt-features branch January 20, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants