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

Prefer line comments // over block comments /* */ #2738

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

JurajSadel
Copy link
Contributor

Nothing too fancy, when I read through SPI driver I noticed we used /* */ in some places.

@JurajSadel JurajSadel added the skip-changelog No changelog modification needed label Dec 11, 2024
Copy link
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

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

I'm somewhat conflicted here, I think we shouldn't specify style choices in our documentation, but we should consider rustfmt to only accept the style we want. The normalize_comments option exists, although unfortunately it's unstable. See rust-lang/rustfmt#3350

But we can move forward as is, the change is innocent enough.

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up! It would be nice is rustfmt could do it for us, but I don't think using a nightly rustfmt is a good idea.

@MabezDev MabezDev added this pull request to the merge queue Dec 12, 2024
Merged via the queue into esp-rs:main with commit 3a03dd8 Dec 12, 2024
29 checks passed
@JurajSadel JurajSadel deleted the comments branch December 12, 2024 16:37
@MabezDev
Copy link
Member

Just had a thought, we could probably use nightly rustfmt this to normalize esp-wifi comments, even if we don't run it in CI. I think we have quite of these from generated code and/or copying C snippets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants