Skip to content

rust: kernel: use feature individually #636

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

Merged
merged 1 commit into from
Jan 20, 2022

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